This commit is contained in:
Byung Jun Park
2017-07-17 23:38:00 +09:00
parent 89dc2363dc
commit de3a771eed
15 changed files with 71 additions and 305 deletions

View File

@@ -11,7 +11,6 @@ import Platform from '@overflow/commons/platform';
import { store, sagaMiddleware, history } from './redux/store';
import sagas from './redux/saga';
import muiTheme from './theme/mui';
import routes from './router';
injectTapEventPlugin();

View File

@@ -36,19 +36,19 @@ function subscribe(socket: WebSocket): Channel<string> {
}
function* read(socket: WebSocket): SagaIterator {
const channel = yield call(subscribe, socket);
let action = yield takeEvery(channel, (action: A) => any);
while (true) {
let action = yield take(channel);
yield put(action);
}
// const channel = yield call(subscribe, socket);
// let action = yield takeEvery(channel, (action: A) => any);
// while (true) {
// let action = yield take(channel);
// yield put(action);
// }
}
function* write(socket: WebSocket): SagaIterator {
while (true) {
const { payload } = yield take(`${sendMessage}`);
socket.emit('message', payload);
}
// while (true) {
// const { payload } = yield take(`${sendMessage}`);
// socket.emit('message', payload);
// }
}
function* flow(): SagaIterator {

View File

@@ -7,7 +7,7 @@ const routes = (
<Switch>
<Route exact path='/' />
<Route path='/signin' component={Signin} />
<Route component={NoMatch}/>
</Switch>
);

View File

@@ -1,25 +0,0 @@
import { colors, getMuiTheme, MuiTheme, spacing } from 'material-ui/styles';
import { fade } from 'material-ui/utils/colorManipulator';
const muiTheme:MuiTheme = getMuiTheme({
spacing: spacing,
fontFamily: 'Roboto, sans-serif',
palette: {
primary1Color: colors.cyan500,
primary2Color: colors.cyan700,
primary3Color: colors.grey400,
accent1Color: colors.pinkA200,
accent2Color: colors.grey100,
accent3Color: colors.grey500,
textColor: colors.darkBlack,
alternateTextColor: colors.white,
canvasColor: colors.white,
borderColor: colors.grey300,
disabledColor: fade(colors.darkBlack, 0.3),
pickerHeaderColor: colors.cyan500,
clockCircleColor: fade(colors.darkBlack, 0.07),
shadowColor: colors.fullBlack,
},
});
export default muiTheme;