Skip to content

Commit

Permalink
feat: Add "Not Found" page for HSR, Wuthering Waves, and Zenless
Browse files Browse the repository at this point in the history
This commit adds a "Not Found" page for the HSR, Wuthering Waves, and Zenless sections of the application. The page displays a message indicating that the requested page does not exist and provides a button to navigate back to the home page. This addition improves the user experience by providing a clear indication of invalid URLs and a convenient way to return to the main content.
  • Loading branch information
dvaJi committed Jul 23, 2024
1 parent 1936550 commit 326db45
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 1 deletion.
14 changes: 14 additions & 0 deletions app/[lang]/hsr/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"use client";

import Link from "next/link";

export default function Error() {
return (
<div>
<h2>Page not found</h2>
<Link href="/hsr">
<button>Go Home</button>
</Link>
</div>
);
}
14 changes: 14 additions & 0 deletions app/[lang]/wuthering-waves/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"use client";

import Link from "next/link";

export default function Error() {
return (
<div>
<h2>Page not found</h2>
<Link href="/wuthering-waves">
<button>Go Home</button>
</Link>
</div>
);
}
35 changes: 35 additions & 0 deletions app/[lang]/zenless/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"use client";

import Image from "next/image";
import Link from "next/link";

export default function Error() {
return (
<div className="relative z-20 overflow-hidden p-6">
<Image
className="absolute -top-4 left-0 z-10 opacity-20 grayscale md:opacity-40 lg:opacity-50"
src="/imgs/stickers/Sticker_Set_1_Nicole_smash.webp"
width={250}
height={400}
alt="Nicole"
/>
<div className="relative z-20 text-center">
<h2 className="mb-6 text-3xl">Not Found</h2>
<p className="text-lg">
We&apos;re sorry, but the page you are looking for does not exist.
<br />
<br />
<br />
<Link
href="/zenless"
className="text-slate-800 underline hover:text-slate-950"
>
<button className="rounded-2xl border-2 border-black px-4 py-2 font-semibold ring-black transition-all hover:bg-white hover:ring-4">
Go Home
</button>
</Link>
</p>
</div>
</div>
);
}
2 changes: 1 addition & 1 deletion sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Sentry.init({
// So we need to find the last frame that is not from Sentry or pubfig.engine.js

const adsFilenames =
/.*(bao-csm|hadron\.js|pubfig\.engine|prebid-analytics|app:\/\/\/ym\.[0-9]\.js|app:\/\/\/pageFold\/ftpagefold_v).*/;
/.*(bao-csm|hadron\.js|inpage\.js|pubfig\.engine|prebid-analytics|app:\/\/\/ym\.[0-9]\.js|app:\/\/\/pageFold\/ftpagefold_v).*/;

for (let i = frames.length - 1; i >= 0; i--) {
const frame = frames[i];
Expand Down

0 comments on commit 326db45

Please sign in to comment.