1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-26 05:16:41 +07:00

made sample profile page

This commit is contained in:
Fedor Katurov 2021-10-01 12:01:11 +07:00
parent b43fb35b47
commit a808045a7d
17 changed files with 118 additions and 179 deletions

View file

@ -4,9 +4,13 @@ import { Route, RouteComponentProps, Switch } from 'react-router';
import { useDispatch } from 'react-redux';
import { authLoadProfile } from '~/redux/auth/actions';
import { useShallowSelect } from '~/utils/hooks/useShallowSelect';
import { selectAuthProfile } from '~/redux/auth/selectors';
import { selectAuthProfile, selectUser } from '~/redux/auth/selectors';
import { ProfilePageLeft } from '~/containers/profile/ProfilePageLeft';
import { Container } from '~/containers/main/Container';
import { FlowGrid } from '~/components/flow/FlowGrid';
import { FlowLayout } from '~/layouts/FlowLayout';
import { Sticky } from '~/components/containers/Sticky';
import { selectFlow } from '~/redux/flow/selectors';
type Props = RouteComponentProps<{ username: string }> & {};
@ -15,6 +19,9 @@ const ProfileLayout: FC<Props> = ({
params: { username },
},
}) => {
const { nodes } = useShallowSelect(selectFlow);
const user = useShallowSelect(selectUser);
const dispatch = useDispatch();
useEffect(() => {
@ -25,7 +32,15 @@ const ProfileLayout: FC<Props> = ({
return (
<Container className={styles.wrap}>
<ProfilePageLeft profile={profile} username={username} />
<div className={styles.left}>
<Sticky>
<ProfilePageLeft profile={profile} username={username} />
</Sticky>
</div>
<div className={styles.grid}>
<FlowGrid nodes={nodes} user={user} onChangeCellView={console.log} />
</div>
</Container>
);
};