mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-03-28 11:13:16 +00:00
feat: permanent discord button
This commit is contained in:
parent
87b9d3f4c3
commit
8f63e6c365
2 changed files with 38 additions and 25 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { Metadata } from "next";
|
||||
import { redirect } from "next/navigation";
|
||||
import { Suspense } from "react";
|
||||
import { Icon } from "@iconify/react";
|
||||
|
||||
import { auth } from "@/lib/auth";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
|
|
@ -36,7 +37,7 @@ export async function generateMetadata({ searchParams }: Props): Promise<Metadat
|
|||
|
||||
export default async function Page({ searchParams }: Props) {
|
||||
const session = await auth();
|
||||
const { tags } = await searchParams;
|
||||
const { page, tags } = await searchParams;
|
||||
|
||||
if (session?.user && !session.user.username) {
|
||||
redirect("/create-username");
|
||||
|
|
@ -55,7 +56,21 @@ export default async function Page({ searchParams }: Props) {
|
|||
<>
|
||||
<h1 className="sr-only">{tags ? `Miis tagged with '${tags}' - TomodachiShare` : "TomodachiShare - index mii list"}</h1>
|
||||
|
||||
{(!page || page === "1") && (
|
||||
<div className="flex justify-center gap-2 mb-2">
|
||||
<a
|
||||
href="https://discord.gg/48cXBFKvWQ"
|
||||
className="bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg px-4 py-2.5 flex justify-center items-center gap-4 w-fit"
|
||||
>
|
||||
<Icon icon="ic:baseline-discord" fontSize={48} className="text-indigo-400" />
|
||||
<div>
|
||||
<p className="text-xl font-bold">Join the Discord</p>
|
||||
<p className="text-sm">Code: 48cXBFKvWQ</p>
|
||||
</div>
|
||||
</a>
|
||||
<Countdown />
|
||||
</div>
|
||||
)}
|
||||
<Suspense fallback={<Skeleton />}>
|
||||
<MiiList searchParams={await searchParams} />
|
||||
</Suspense>
|
||||
|
|
|
|||
|
|
@ -34,10 +34,9 @@ export default function Countdown() {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<div className="flex justify-center">
|
||||
<div className="bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg p-4 mb-2 flex justify-center items-center gap-12 w-fit">
|
||||
<div className="bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg px-4 py-2.5 flex justify-center items-center gap-8 w-fit">
|
||||
<div className="flex flex-col">
|
||||
<h1 className="text-2xl font-bold">Living the Dream</h1>
|
||||
<h1 className="text-xl font-bold">Living the Dream</h1>
|
||||
<h2 className="text-right text-sm">releases in:</h2>
|
||||
</div>
|
||||
|
||||
|
|
@ -60,6 +59,5 @@ export default function Countdown() {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue