less hacking way of pulling poe data
This commit is contained in:
32
app/wrapper.tsx
Normal file
32
app/wrapper.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import React from 'react';
|
||||
import { Home, LoginWebview } from './components';
|
||||
import { AppStore } from './stores/app.store';
|
||||
|
||||
interface IProps {
|
||||
appStore?: AppStore;
|
||||
}
|
||||
|
||||
interface IState {}
|
||||
|
||||
@inject('appStore')
|
||||
@observer
|
||||
export class Wrapper extends React.Component<IProps, IState> {
|
||||
constructor(props: any) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
public render() {
|
||||
const { appStore } = this.props;
|
||||
|
||||
if (!appStore!.appReady) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!appStore!.isLoggedIn) {
|
||||
return <LoginWebview />;
|
||||
}
|
||||
|
||||
return <Home />;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user