mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
* fix: kv use tls explicit * fix: token refresh locking * remove logs * compile fix * compile fix --------- Co-authored-by: Igor Loskutov <igor.loskutoff@gmail.com>
9 lines
261 B
TypeScript
9 lines
261 B
TypeScript
import { useAuth } from "./AuthProvider";
|
|
|
|
export const useUserName = (): string | null | undefined => {
|
|
const auth = useAuth();
|
|
if (auth.status !== "authenticated" && auth.status !== "refreshing")
|
|
return undefined;
|
|
return auth.user?.name || null;
|
|
};
|