From 4ea4cd370cf7a4bfa3a48e23f8ea0179eed53cc5 Mon Sep 17 00:00:00 2001 From: gunshiz Date: Tue, 7 Jul 2026 22:14:49 +0700 Subject: [PATCH] style(404): better image path --- app/form/[id]/not-found.tsx | 69 ++++++++++++++++++++++++++++++------- app/not-found.tsx | 7 ++-- 2 files changed, 61 insertions(+), 15 deletions(-) diff --git a/app/form/[id]/not-found.tsx b/app/form/[id]/not-found.tsx index abed5f6..ff68b1b 100644 --- a/app/form/[id]/not-found.tsx +++ b/app/form/[id]/not-found.tsx @@ -1,28 +1,71 @@ +"use client"; + import Link from "next/link"; import Image from "next/image"; import { Button } from "@/components/ui/button"; +import { useEffect, useState } from "react"; +import { Spinner } from "@/components/ui/spinner"; +import Background from "@/public/404.png"; +import Profile from "@/public/404-image.jpg"; +import { Activity, Home } from "lucide-react"; +import { Skeleton } from "@/components/ui/skeleton"; export default function NotFound() { + const [goingHome, goHome] = useState(false); + const [message, setMessage] = useState(""); + + useEffect(() => { + const messages = [ + "ฟอร์มนี้อาจจะถูก Erika กินไปแล้ว...", + "หรือว่าฟอร์มนี้โดน Sukuna เล่นไปแล้ว...", + "ฟอร์มนี้อาจจะหมดอายุหรือโดนลบไปแล้ว...", + "บางทีคนสร้างอาจจะลืมเปิดฟอร์มนะ...", + "ฟอร์มหายไปไหนน้า... ลองเช็คลิงก์ดูอีกทีสิ", + ]; + + setMessage(messages[Math.floor(Math.random() * messages.length)]); + }, []); + return ( -
+
404 Background - -
-

404

-

ไม่พบฟอร์มที่คุณหา

-

- ขออภัย ฟอร์มที่คุณกำลังพยายามเข้าถึงอาจถูกลบหรือไม่มีอยู่ตั้งแต่แรก -

- +
+ 404
+

404 ไม่พบหน้านี้

+ {message || } +
+ + + + + + +
); } diff --git a/app/not-found.tsx b/app/not-found.tsx index fd28802..24b1093 100644 --- a/app/not-found.tsx +++ b/app/not-found.tsx @@ -5,6 +5,8 @@ import Image from "next/image"; import { Button } from "@/components/ui/button"; import { useEffect, useState } from "react"; import { Spinner } from "@/components/ui/spinner"; +import Background from "@/public/404.png"; +import Profile from "@/public/404-image.jpg"; import { Activity, Home } from "lucide-react"; import { Skeleton } from "@/components/ui/skeleton"; @@ -27,14 +29,15 @@ export default function NotFound() { return (
404 Background
-