Skip to content

Commit de100b9

Browse files
author
Boopathi
committed
Update page component and Firebase auth hook
1 parent 1a893c0 commit de100b9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/app/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { format } from "date-fns";
1313
import { Dialog, DialogContent } from "@/components/ui/dialog";
1414
import { Loader2 } from "lucide-react";
1515
import { signOut } from "firebase/auth";
16-
import { auth } from "@/hooks/use-firebase-auth";
16+
import { useFirebaseAuth } from "@/hooks/use-firebase-auth";
1717
import { API_BASE_URL } from "@/lib/api";
1818

1919
// A more obvious loading animation to show while dynamic components are being downloaded.
@@ -60,6 +60,7 @@ export default function Home() {
6060
const [isLoading, setIsLoading] = useState(true);
6161
const router = useRouter();
6262
const searchParams = useSearchParams();
63+
const { auth } = useFirebaseAuth();
6364

6465
// This effect runs once on mount to set initial state from localStorage
6566
useEffect(() => {

src/hooks/use-firebase-auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ export function useFirebaseAuth() {
2121
return () => unsubscribe();
2222
}, []);
2323

24-
return { user, loading };
24+
return { user, loading, auth };
2525
}

0 commit comments

Comments
 (0)