fix: remove crap
This commit is contained in:
parent
5604b84df1
commit
dad132029c
|
@ -4,8 +4,7 @@ import {isAnonymousSelector} from '@reddichat/user/client';
|
|||
import React from 'react';
|
||||
import {useSelector} from 'react-redux';
|
||||
import {hot} from 'react-hot-loader';
|
||||
import {Route, Router, Switch} from 'react-router-dom';
|
||||
import {createBrowserHistory} from 'history';
|
||||
import {Route, Switch} from 'react-router-dom';
|
||||
|
||||
import About from 'components/about';
|
||||
import Chat from 'components/chat';
|
||||
|
@ -13,14 +12,11 @@ import Home from 'components/home';
|
|||
import Left from 'components/left';
|
||||
import Right from 'components/right';
|
||||
|
||||
const history = createBrowserHistory();
|
||||
|
||||
const App = () => {
|
||||
const isAnonymous = useSelector(isAnonymousSelector);
|
||||
return (
|
||||
<div className="app">
|
||||
{<Left />}
|
||||
<Router history={history}>
|
||||
{!isAnonymous && <Left />}
|
||||
<Switch>
|
||||
<Route
|
||||
component={Home}
|
||||
|
@ -36,10 +32,9 @@ const App = () => {
|
|||
path="/chat"
|
||||
/>
|
||||
</Switch>
|
||||
</Router>
|
||||
{<Right />}
|
||||
{!isAnonymous && <Right />}
|
||||
</div>
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
export default hot(module)(App);
|
||||
|
|
Loading…
Reference in New Issue
Block a user