Skip to content
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

Supabase hook cleanup/Cleaner Index #17

Merged

Conversation

Jacksonmills
Copy link
Collaborator

No description provided.

Optimized authentication flow by removing redundant loggedIn state in favor of direct checks using user and supabaseClient. Updated useSupabase hook to manage auth state changes and improved type definitions for clarity and type safety in useSupabaseConfig utility functions.
Implemented a visual LoadingSpinner component and integrated it into the main page to improve user experience during initial session checking. Now, the page displays a loading spinner until the Supabase session status is verified, enhancing feedback during asynchronous operations. Also included is the sessionChecked state to reliably track the completion of the session check. This change prevents the app from prematurely displaying login or chat components before the session state is determined.

Refactored useSupabase hook to handle session checking and state updates more effectively, ensuring that the user interface accurately reflects the current authentication state.
Copy link

vercel bot commented Feb 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ad-deus ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2024 7:32pm

@adamcohenhillel
Copy link
Owner

Looks neat! but It seems to be stuck on the loading component :

image

(check out the Vercel preview)

@Jacksonmills
Copy link
Collaborator Author

Looks neat! but It seems to be stuck on the loading component :
image

(check out the Vercel preview)

Ah yeah I see as a new user/incognito it defaults to loading, let me figure out that edge case.

@adamcohenhillel adamcohenhillel changed the title Supabase hook cleanup/Better logged in loading state [WIP] Supabase hook cleanup/Better logged in loading state Feb 6, 2024
@adamcohenhillel
Copy link
Owner

Need to wait for this? #19

@Jacksonmills
Copy link
Collaborator Author

Need to wait for this? #19

We could, but this is done in that I only really meant to fix the 'any' in the supabase hook in the ticket

@Jacksonmills Jacksonmills changed the title [WIP] Supabase hook cleanup/Better logged in loading state Supabase hook cleanup/Cleaner Index Feb 12, 2024
@adamcohenhillel adamcohenhillel merged commit 3c94e4f into adamcohenhillel:main Feb 12, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants