-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: rework the useAuth hook #126
base: main
Are you sure you want to change the base?
Conversation
8219568
to
83ca7fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels snappy indeed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am (sometimes) getting this error after clicking logout. It seems to happen when I'm on the "Users" page when logging out.
Logs
NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
at 354-6e0ed2af89a87bf1.js:1:289289
at oP (4bd1b696-d2e2b461159d0368.js:1:81871)
at ir (4bd1b696-d2e2b461159d0368.js:1:100512)
at ie (4bd1b696-d2e2b461159d0368.js:1:99775)
at it (4bd1b696-d2e2b461159d0368.js:1:99907)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99907)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99907)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99907)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99907)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99907)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99907)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at ie (4bd1b696-d2e2b461159d0368.js:1:99837)
at it (4bd1b696-d2e2b461159d0368.js:1:99973)
at uf (4bd1b696-d2e2b461159d0368.js:1:124786)
at o (4bd1b696-d2e2b461159d0368.js:1:120959)
at MessagePort.T (517-f5f5803271fec325.js:1:107437)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is weird, it only happens when the table in either page has more than 0 items.
Description
This change reworks the useAuth hook so that the rest of the application does not have to use cookies directly. This means that all user login and logout functionality can be used through the useAuth hook. This includes logging in, logging out, initializing first user and checking if the first user is initialized. It also includes caching function definitions and disables queries right up until when the cookie loads into the browser, so it should feel much snappier to use the application.
Checklist: