feat: fix undefined user name
parent
45178d1312
commit
4c6c52d59b
|
@ -15,7 +15,7 @@ export default function AdminLayout(props: AdminLayoutProps) {
|
|||
const { children } = props;
|
||||
const [_loadingLogout, setLoadingLogout] = useState(false);
|
||||
const user = useRecoilValue(UserDataState);
|
||||
const initialName = getInitialName(user.name);
|
||||
const initialName = getInitialName(user?.name ?? '');
|
||||
|
||||
async function handleClickLogout() {
|
||||
setLoadingLogout(true);
|
||||
|
|
Loading…
Reference in New Issue