diff --git a/src/layouts/FlowLayout/index.tsx b/src/layouts/FlowLayout/index.tsx index 7b9bacf4..551fdba2 100644 --- a/src/layouts/FlowLayout/index.tsx +++ b/src/layouts/FlowLayout/index.tsx @@ -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 (
@@ -30,7 +37,7 @@ const FlowLayout = observer(() => {
- {!isUser && ( + {showLoginStamp && (