feat: add UI components and improve layout
- Introduced new UI components: Input, Label, ScrollArea, Separator, Sheet, Skeleton, Table. - Implemented utility function for class name merging. - Enhanced the authenticated layout with a sidebar and user menu. - Added login functionality with improved UI and error handling. - Integrated theme provider for consistent theming across the application. - Updated styles with Tailwind CSS and custom properties for dark mode support. - Refactored routes to utilize new components and improve user experience.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { createClient, type User } from '@supabase/supabase-js'
|
||||
import { redirect, useRouter } from '@tanstack/react-router'
|
||||
import { createContext, useContext, useEffect, useState } from 'react'
|
||||
|
||||
const supabase = createClient(
|
||||
export const supabase = createClient(
|
||||
import.meta.env.VITE_SUPABASE_URL,
|
||||
import.meta.env.VITE_SUPABASE_ANON_KEY,
|
||||
)
|
||||
@@ -59,7 +60,7 @@ export function SupabaseAuthProvider({
|
||||
const logout = async () => {
|
||||
const { error } = await supabase.auth.signOut()
|
||||
if (error) throw error
|
||||
location.reload()
|
||||
location.href = "/login"
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user