mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-28 16:07:49 +01:00
cleanup app.tsx
This commit is contained in:
@@ -18,12 +18,10 @@ interface IAppComponentProps extends RouteComponentProps {
|
||||
|
||||
export function AppComponent(props: IAppComponentProps) {
|
||||
const { loggedIn } = props;
|
||||
const { location } = props.history;
|
||||
return loggedIn ? (
|
||||
<Switch>
|
||||
<Route path="/signup" component={AuthScreen} />,
|
||||
<Route path="/login" component={AuthScreen} />,
|
||||
<Route path="/docs/:id" component={Home} />,
|
||||
<Route path="/" component={Home} />,
|
||||
</Switch>
|
||||
) : (
|
||||
@@ -37,7 +35,7 @@ export function AppComponent(props: IAppComponentProps) {
|
||||
}
|
||||
|
||||
function mapStateToProps(state: IAppState) {
|
||||
return { loggedIn: !(state.auth.jwt === null) };
|
||||
return { loggedIn: state.auth.jwt !== null };
|
||||
}
|
||||
|
||||
export const App = withRouter(connect(mapStateToProps)(AppComponent));
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"typescriptHero.imports.stringQuoteStyle": "\"",
|
||||
"files.exclude": {
|
||||
"**/node_modules": true
|
||||
}
|
||||
},
|
||||
"typescript.tsdk": "writer/node_modules/typescript/lib"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user