Add Toast context for notifications and refactor community features

This commit is contained in:
Matthieu
2025-11-24 15:39:52 +01:00
parent 459cc0eced
commit ea287efdbf
10 changed files with 965 additions and 1237 deletions

View File

@@ -34,13 +34,12 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
const { error } = await supabase
.from('profiles')
.upsert(
{
id: session.user.id,
theme_color: 'blue' // Default theme color
{
id: session.user.id
},
{ onConflict: 'id' }
);
if (error) {
console.error('Error creating profile:', error);
}
@@ -65,8 +64,7 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
const { error: profileError } = await supabase
.from('profiles')
.insert({
id: data.user!.id,
theme_color: 'blue' // Default theme color
id: data.user!.id
});
if (profileError) {
@@ -104,4 +102,4 @@ export function useAuth() {
throw new Error('useAuth must be used within an AuthProvider');
}
return context;
}
}