-
Notifications
You must be signed in to change notification settings - Fork 0
DBP-35: redirect comments page to discord community #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pan93412
merged 4 commits into
main
from
pan93412/dbp-35-redirect-comments-to-discord-community
Oct 22, 2025
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import NotFoundLayout from "@/components/not-found-layout"; | ||
|
|
||
| export default async function NotFoundPage() { | ||
| return <NotFoundLayout />; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| "use client"; | ||
|
|
||
| import dynamic from "next/dynamic"; | ||
| import CurrentPage from "./current-page"; | ||
|
|
||
| export const CurrentPageLazy = dynamic(() => Promise.resolve(CurrentPage), { | ||
| ssr: false, | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| /** | ||
| * Get the current page URL. | ||
| * | ||
| * Note that this function is not SSR-friendly. | ||
| * You should import it with `current-page.lazy.tsx`, which disables SSR. | ||
| */ | ||
| export default function CurrentPage() { | ||
| return <p>網址:{window.location.href}</p>; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| import { Logo } from "@/components/logo"; | ||
| import { Button } from "@/components/ui/button"; | ||
| import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"; | ||
| import { AlertTriangle } from "lucide-react"; | ||
| import Link from "next/link"; | ||
| import { Suspense } from "react"; | ||
| import { CurrentPageLazy } from "./current-page.lazy"; | ||
|
|
||
| export default async function NotFoundLayout() { | ||
| return ( | ||
| <div | ||
| className={` | ||
| flex min-h-svh flex-col items-center justify-center gap-6 | ||
| bg-linear-to-br from-red-50 via-white to-red-100 p-6 | ||
pan93412 marked this conversation as resolved.
Show resolved
Hide resolved
pan93412 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| md:p-10 | ||
| `} | ||
| > | ||
| <Link | ||
| href="/" | ||
| className={`flex items-center gap-2 self-center font-medium`} | ||
| > | ||
| <div | ||
| className={` | ||
| flex size-6 items-center justify-center rounded-md | ||
| text-primary-foreground | ||
| `} | ||
| > | ||
| <Logo /> | ||
| </div> | ||
| 資料庫練功坊 | ||
| </Link> | ||
| <Card className="min-w-md"> | ||
pan93412 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <CardHeader className="flex w-full flex-col items-center text-center"> | ||
| <AlertTriangle className="mb-2 size-7 text-red-500" /> | ||
| <CardTitle className="text-xl">找不到此頁面</CardTitle> | ||
| <CardDescription> | ||
| 此頁面不存在或已經被移除。<br />請確認網址是否正確,或回到首頁。 | ||
| </CardDescription> | ||
| </CardHeader> | ||
| <CardContent className="flex flex-col items-center gap-4"> | ||
| <Button asChild variant="outline"> | ||
| <Link href="/">回到首頁</Link> | ||
| </Button> | ||
| </CardContent> | ||
| <CardFooter | ||
| className={`justify-center text-center text-xs text-muted-foreground`} | ||
| > | ||
| <Suspense> | ||
| <CurrentPageLazy /> | ||
| </Suspense> | ||
| </CardFooter> | ||
| </Card> | ||
| </div> | ||
| ); | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.