This commit is contained in:
2020-12-25 12:26:47 +03:00
commit 569e90b529
45 changed files with 18723 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import React, {memo} from 'react';
import {AuthService} from '../../../../services/AuthService';
import {useStream} from '../../../../utils/useStream';
import ComponentStream from '../component-stream/ComponentStream';
const MainPage: React.FC = () => {
const {isAuth} = useStream(AuthService.state$, AuthService.initState);
const toggle = () => AuthService.handleChangeAuth(!isAuth);
return (
<div>
Main Page
Auth: {isAuth ? 'yes' : 'no'}
<button onClick={toggle}>click</button>
<ComponentStream />
</div>
);
};
export default memo(MainPage);