mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
8 lines
225 B
TypeScript
8 lines
225 B
TypeScript
import { useAuth } from "./AuthProvider";
|
|
|
|
export const useUserName = (): string | null | undefined => {
|
|
const auth = useAuth();
|
|
if (auth.status !== "authenticated") return undefined;
|
|
return auth.user?.name || null;
|
|
};
|