fix lightning when loading session

This commit is contained in:
keyan 2021-09-24 18:51:07 -05:00
parent 8c5832c3e6
commit 4ba0bcd416
1 changed files with 4 additions and 5 deletions

View File

@ -33,11 +33,7 @@ export default function Header () {
const [session, loading] = useSession() const [session, loading] = useSession()
const Corner = () => { const Corner = () => {
if (loading && !me) { if (me) {
return null
}
if (session) {
return ( return (
<div className='d-flex align-items-center'> <div className='d-flex align-items-center'>
<Head> <Head>
@ -101,6 +97,9 @@ export default function Header () {
</div> </div>
) )
} else { } else {
if (loading || session) {
return null
}
const strike = useLightning() const strike = useLightning()
useEffect(() => { useEffect(() => {
setTimeout(strike, randInRange(3000, 10000)) setTimeout(strike, randInRange(3000, 10000))