From 4428cc680f67bd6e3e52d2ec4121a2cbe7602dca Mon Sep 17 00:00:00 2001 From: Ren Amamiya <123083837+reyamir@users.noreply.github.com> Date: Fri, 24 Feb 2023 15:29:40 +0700 Subject: [PATCH] fixed build errors --- src/components/navigatorBar/index.tsx | 13 ++++++------- src/components/navigatorBar/profileMenu.tsx | 5 +---- src/pages/profile/update.tsx | 5 ++++- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/components/navigatorBar/index.tsx b/src/components/navigatorBar/index.tsx index d3c9e338..b11d920e 100644 --- a/src/components/navigatorBar/index.tsx +++ b/src/components/navigatorBar/index.tsx @@ -3,8 +3,6 @@ import ActiveLink from '@components/activeLink'; import CreatePost from '@components/navigatorBar/createPost'; import { ProfileMenu } from '@components/navigatorBar/profileMenu'; -import { truncate } from '@utils/truncate'; - import { currentUser } from '@stores/currentUser'; import { useStore } from '@nanostores/react'; @@ -12,7 +10,10 @@ import { PlusIcon } from '@radix-ui/react-icons'; export default function NavigatorBar() { const $currentUser: any = useStore(currentUser); - const profile = JSON.parse($currentUser.metadata); + const profile = + $currentUser.metadata !== undefined + ? JSON.parse($currentUser.metadata) + : { display_name: null, username: null }; return (