Pixsa
09/03/2021, 3:04 PMuser
09/03/2021, 3:06 PMnikivi
09/03/2021, 3:06 PMsilentworks
09/03/2021, 3:11 PMnikivi
09/03/2021, 3:55 PMAuth.useUser();
inside useEffect
?
I have this code https://github.com/learn-anything/learn-anything/blob/main/pages/login.tsx
I want to redirect users from /login page if they are already authenticated. Issue is that const { user } = Auth.useUser(); takes time to get result so inside my useEffect, user will be null always. is there a proper way to do it?Scott P
09/03/2021, 4:14 PMPoypoypoy
09/04/2021, 11:28 AMPixsa
09/04/2021, 3:03 PMHorseShoe
09/04/2021, 5:43 PMuser
09/04/2021, 8:23 PMuser
09/04/2021, 10:05 PMuser
09/04/2021, 10:05 PMDaniel
09/04/2021, 10:20 PMThomas B
09/04/2021, 11:45 PMdarora
09/05/2021, 12:16 AMThomas B
09/05/2021, 12:23 AMdarora
09/05/2021, 12:32 AMJoshTheNerd
09/05/2021, 5:05 AMJoshTheNerd
09/05/2021, 5:06 AMUsers can insert their own profile.
policy made from the example user management sql code is untouched and says (uid() = id)
Daniel
09/05/2021, 6:04 AMmendesrenan5
09/05/2021, 11:29 AMmendesrenan5
09/05/2021, 11:31 AMJoshTheNerd
09/05/2021, 3:03 PMJoshTheNerd
09/05/2021, 3:03 PMKaran
09/05/2021, 3:24 PMKaran
09/05/2021, 3:24 PMKaran
09/05/2021, 3:25 PMNine
09/05/2021, 4:52 PMNine
09/05/2021, 4:52 PM