"use client"; import { Link } from "@tanstack/react-router"; import { useEffect, useState } from "react"; import { authClient } from "@/lib/auth-client"; export default function Footer() { const [isAdmin, setIsAdmin] = useState(false); const [isLoading, setIsLoading] = useState(true); useEffect(() => { authClient.getSession().then((session) => { const user = session.data?.user as { role?: string } | undefined; setIsAdmin(user?.role === "admin"); setIsLoading(false); }); }, []); return ( ); }