diff --git a/web/hooks/use-user.ts b/web/hooks/use-user.ts index 24075851..ca7f6191 100644 --- a/web/hooks/use-user.ts +++ b/web/hooks/use-user.ts @@ -1,11 +1,10 @@ -import { useEffect, useLayoutEffect, useState } from 'react' +import { useEffect, useState } from 'react' import { listenForLogin, listenForUser, User } from '../lib/firebase/users' export const useUser = () => { const [user, setUser] = useState(undefined) - // Use layout effect to trigger re-render before first paint. - useLayoutEffect(() => listenForLogin(setUser), []) + useEffect(() => listenForLogin(setUser), []) const userId = user?.id