feat: port mii list to use api route

also make search bar redirect to index page with search param instead of
a new page
This commit is contained in:
trafficlunar 2025-04-12 23:13:34 +01:00
parent 90eca1bf3f
commit 53a23f35ef
7 changed files with 116 additions and 166 deletions

View file

@ -11,10 +11,9 @@ import MiiList from "@/app/components/mii-list";
interface Props {
params: Promise<{ slug: string }>;
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}
export default async function ProfilePage({ params, searchParams }: Props) {
export default async function ProfilePage({ params }: Props) {
const session = await auth();
const { slug } = await params;
@ -59,7 +58,7 @@ export default async function ProfilePage({ params, searchParams }: Props) {
</div>
</div>
<MiiList searchParams={searchParams} userId={user?.id} />
<MiiList isLoggedIn={session?.user != null} userId={user?.id} />
</div>
);
}