Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions apps/web/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ export default function Home() {
},
]}
extra={
new Date() >= new Date("2025-02-24T12:00:00") ? (
<Link href="/sign-in">
<Button>สมัครเลย!</Button>
</Link>
) : undefined
<Link href="/sign-in">
<Button>สมัครเลย!</Button>
</Link>
}
/>
</div>
Expand Down
7 changes: 1 addition & 6 deletions apps/web/src/app/register/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Navbar from "@/components/navigate/navbar";
import Spinner from "@/components/spinner";
import { Button } from "@/components/ui/button";
import { fetchClient } from "@/libs/server/client";
import { notFound, redirect, useRouter } from "next/navigation";
import { redirect, useRouter } from "next/navigation";
import { useEffect, useState } from "react";
import { steps } from "./form-stepper";

Expand All @@ -21,11 +21,6 @@ export default function RegisterLayout({
const router = useRouter();

useEffect(() => {
const deadline = new Date("2025-02-24T12:00:00");
if (new Date() <= deadline) {
return notFound();
}

async function checkUser() {
try {
const { data } = await fetchClient.GET("/auth/me");
Expand Down
27 changes: 10 additions & 17 deletions apps/web/src/components/landing/hero.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import FadeObserverDiv from "@/components/landing/fade-div";
import Timer from "@/components/timer";
import Image from "next/image";
import Link from "next/link";
import { Magnetic } from "../animation/magnetics";
Expand Down Expand Up @@ -44,22 +43,16 @@ function Hero() {
</small>
</div>

{new Date() >= new Date("2025-02-24T09:00:00") ? (
<Link href="/sign-in">
<Magnetic range={300}>
<Button
className="rounded-4xl font-prompt h-[5rem] w-fit px-20 text-3xl"
variant="destructive"
>
สมัครเลย! 🎮
</Button>
</Magnetic>
</Link>
) : (
<div className="w-fit pt-6">
<Timer deadline="February, 24, 2025 12:00 PM" />
</div>
)}
<Link href="/sign-in">
<Magnetic range={300}>
<Button
className="rounded-4xl font-prompt h-[5rem] w-fit px-20 text-3xl"
variant="destructive"
>
สมัครเลย! 🎮
</Button>
</Magnetic>
</Link>
</div>
</div>
<div className="hidden 2xl:block">
Expand Down
Loading