import React, { useContext } from "react"; import { AuthContext } from "../contexts/AuthContext"; const ProtectedPage: React.FC = () => { const { isAuthenticated, user, loading } = useContext(AuthContext); if (loading) { return
Loading...
; } if (!isAuthenticated || !user) { return (You are not logged in.
Welcome, {user.displayName}!
Your user ID is: {user.id}