import { useState, useEffect } from 'react';import { createClient } from '@/lib/supabase';-export function useAuth() {- // TODO: Implement auth- return { user: null };+export function useAuth() {+ const [user, setUser] = useState(null);+ const [loading, setLoading] = useState(true);++ useEffect(() => {+ const supabase = createClient();+ supabase.auth.getUser().then(({ data }) => {+ setUser(data.user);+ setLoading(false);+ });+ }, []);++ return { user, loading };}
Try swiping the card to review code changes
Swipe through digestible code chunks on the go. Review PRs while commuting, waiting in line, or anywhere else.
By continuing, you agree to grant Codeswipe AI access to your selected repositories
© 2025 Codeswipe AI. All rights reserved.