mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 14:44:15 +00:00
fix: redirect to 404 on mii and profile not found
This commit is contained in:
parent
49c6206623
commit
ed33993a42
2 changed files with 7 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import Image from "next/image";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
import { prisma } from "@/lib/prisma";
|
||||
import MiiList from "@/app/components/mii-list";
|
||||
|
||||
interface Props {
|
||||
|
|
@ -19,6 +20,8 @@ export default async function ProfilePage({ params, searchParams }: Props) {
|
|||
|
||||
const likedMiis = await prisma.like.count({ where: { userId: Number(slug) } });
|
||||
|
||||
if (!user) redirect("/404");
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex gap-4 mb-2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue