mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
delay showing login stamp
This commit is contained in:
parent
44ddde9bf7
commit
a00267a75c
1 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
import { useEffect, useState } from 'react';
|
||||
|
||||
import classNames from 'classnames';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
|
||||
|
@ -13,12 +15,17 @@ import { useFlowContext } from '~/utils/providers/FlowProvider';
|
|||
import styles from './styles.module.scss';
|
||||
|
||||
const FlowLayout = observer(() => {
|
||||
const [showLoginStamp, setShowLoginStamp] = useState(false);
|
||||
|
||||
const { heroes, nodes, onChangeCellView, loadMore, isSyncing } =
|
||||
useFlowContext();
|
||||
|
||||
const { user, isUser } = useAuth();
|
||||
|
||||
useInfiniteLoader(loadMore, isSyncing);
|
||||
|
||||
useEffect(() => setShowLoginStamp(!isUser), [isUser]);
|
||||
|
||||
return (
|
||||
<div className={classNames(styles.container)}>
|
||||
<div className={styles.grid}>
|
||||
|
@ -30,7 +37,7 @@ const FlowLayout = observer(() => {
|
|||
<FlowStamp isFluid={false} onToggleLayout={console.warn} />
|
||||
</div>
|
||||
|
||||
{!isUser && (
|
||||
{showLoginStamp && (
|
||||
<div className={styles.login}>
|
||||
<FlowLoginStamp />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue