mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 14:44:15 +00:00
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:
parent
90eca1bf3f
commit
53a23f35ef
7 changed files with 116 additions and 166 deletions
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue