This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const movies = state.movies.map((movie) => { | |
if (movie.id === action.payload.id) { | |
return { | |
...movie, | |
count: action.payload.count | |
} | |
} | |
return movie | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { Provider, connect } from 'react-redux' | |
import { createStore, applyMiddleware } from 'redux' | |
import { composeWithDevTools } from 'redux-devtools-extension' | |
import createSagaMiddleware from 'redux-saga' | |
import PropTypes from 'prop-types' | |
import 'regenerator-runtime/runtime' | |
/* Core Sagas & Socket Sagas */ | |
import { Reducers, Sagas as coreSagas } from './Core' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Immutable from 'seamless-immutable' | |
import { createReducer } from 'reduxsauce' | |
import { Types } from './actions' | |
export const INITIAL_STATE = Immutable({ | |
agentsOnline: 0, | |
estimatedWaitTime: null, | |
estimatedWaitTimeConnecting: false, | |
estimatedWaitTimeAttempts: 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Jest Snapshot v1, https://goo.gl/fbAQLP | |
exports[`When displaying the Chat Header component should display correctly 1`] = ` | |
<header | |
className="lc-header" | |
data-test="lc-header" | |
> | |
<button | |
className="lc-header__close-btn" | |
data-test="lc-header__close-btn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-param-reassign */ | |
import { eventChannel, delay } from 'redux-saga' | |
import { all, take, call, put, race, select, takeEvery } from 'redux-saga/effects' | |
import { Messages } from '../Socket' | |
import { ControlsCreators, SocketCreators } from '../../actions' | |
import { formatAttributesToArray } from '../Api/helpers' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { createServer } = require('http') | |
const { parse } = require('url') | |
const next = require('next') | |
const express = require('express') | |
const app = next({dev: process.env.NODE_ENV !== 'production'}) | |
const handler = app.getRequestHandler() | |
app.prepare().then(() => { | |
const server = express(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x5261e31F06dd599647050197d153e881Ec2fAFc9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
console.log('window? ', window); | |
})(window); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import PropTypes from 'prop-types' | |
class ErrorBoundary extends React.Component { | |
constructor (props) { | |
super(props) | |
this.state = { hasError: false } | |
} | |
componentDidCatch (error, info) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com) | |
* Copyright 2011-2017 The Bootstrap Authors | |
* Copyright 2011-2017 Twitter, Inc. | |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
*/ | |
// Core variables and mixins | |
@import "node_modules/bootstrap/scss/variables"; | |
@import "node_modules/bootstrap/scss/mixins"; |
NewerOlder