diff --git a/src/app/(menu)/(public)/[username]/_components/layouts/EditProfileButton.tsx b/src/app/(menu)/(public)/[username]/_components/layouts/EditProfileButton.tsx index f6106502..73a77844 100644 --- a/src/app/(menu)/(public)/[username]/_components/layouts/EditProfileButton.tsx +++ b/src/app/(menu)/(public)/[username]/_components/layouts/EditProfileButton.tsx @@ -3,16 +3,16 @@ import CapsuleButton from '@/app/_components/button/CapsuleButton'; import ProfileSettingModal from '@/app/(menu)/(public)/[username]/_components/layouts/ProfileSettingModal'; import { useState } from 'react'; +import { useProfile } from '@/swr/client/auth'; -type Props = { - src: string; - displayName: string; - bio: string; -}; - -export function EditProfileButton({ src, displayName, bio }: Props) { +export function EditProfileButton() { const text = 'プロフィールを編集'; const [open, setOpen] = useState(false); + const { data } = useProfile(); + + if (!data) { + return <>; + } return ( <> @@ -28,9 +28,9 @@ export function EditProfileButton({ src, displayName, bio }: Props) { setOpen(false)} /> diff --git a/src/app/(menu)/(public)/[username]/_components/layouts/ProfileCard.tsx b/src/app/(menu)/(public)/[username]/_components/layouts/ProfileCard.tsx index b1a31a5b..203c8d8a 100644 --- a/src/app/(menu)/(public)/[username]/_components/layouts/ProfileCard.tsx +++ b/src/app/(menu)/(public)/[username]/_components/layouts/ProfileCard.tsx @@ -112,13 +112,7 @@ export default function ProfileCard({ {authId && !isMe && ( )} - {authId && isMe && ( - - )} + {authId && isMe && }