diff --git a/src/app/profile/[slug]/page.tsx b/src/app/profile/[slug]/page.tsx
index 61b4fa8..5614cab 100644
--- a/src/app/profile/[slug]/page.tsx
+++ b/src/app/profile/[slug]/page.tsx
@@ -42,7 +42,7 @@ export default async function ProfilePage({ params }: Props) {
{user?.name}
@{user?.username}
-
+
Liked {likedMiis} Miis
@@ -58,7 +58,7 @@ export default async function ProfilePage({ params }: Props) {
-
+
);
}
diff --git a/src/components/mii-list/index.tsx b/src/components/mii-list/index.tsx
index 28bd2ba..1c379af 100644
--- a/src/components/mii-list/index.tsx
+++ b/src/components/mii-list/index.tsx
@@ -18,6 +18,7 @@ interface Props {
isLoggedIn: boolean;
// Profiles
userId?: number;
+ sessionUserId?: number;
}
interface ApiResponse {
@@ -41,7 +42,7 @@ interface ApiResponse {
const fetcher = (url: string) => fetch(url).then((res) => res.json());
-export default function MiiList({ isLoggedIn, userId }: Props) {
+export default function MiiList({ isLoggedIn, userId, sessionUserId }: Props) {
const searchParams = useSearchParams();
const { data, error } = useSWR(`/api/mii/list?${searchParams.toString()}`, fetcher);
@@ -103,11 +104,13 @@ export default function MiiList({ isLoggedIn, userId }: Props) {
- {!userId ? (
+ {!userId && (
@{mii.user?.username}
- ) : (
+ )}
+
+ {userId && sessionUserId == userId && (