Skip to content
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

Sponsor #97

Merged
merged 4 commits into from
Dec 12, 2024
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
27 changes: 27 additions & 0 deletions src/app/register/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { tailChase } from "ldrs";
import { redirect } from "next/navigation";

export default function RegistrationPage() {
const { data: session } = useSession();
const { status } = useSession({
required: true,
onUnauthenticated: async () => {
Expand Down Expand Up @@ -42,6 +43,32 @@ export default function RegistrationPage() {
);
}

if (!session) {
return (
<div className="w-screen h-screen flex justify-center items-center bg-black text-gray-200">
<div className="text-center">
<h1 className="text-3xl font-bold mb-2 text-red-500">Unauthorized</h1>
<p className="text-gray-400">
You need to log in to access this page.
</p>
</div>
</div>
);
}

if (session.user.role !== "ADMIN" && session.user.role !== "COORDINATOR") {
return (
<div className="w-screen h-screen flex justify-center items-center bg-black text-gray-200">
<div className="text-center">
<h1 className="text-3xl font-bold mb-2 text-red-500">Forbidden</h1>
<p className="text-gray-400">
You do not have the required permissions to view this page.
</p>
</div>
</div>
);
}

return (
<div className="flex min-h-screen flex-col items-center justify-center p-4">
<RegistrationForm />
Expand Down
17 changes: 9 additions & 8 deletions src/components/common/cta-section-2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,23 @@ export default function FullScreenCTA() {
</div>
</div>

<div className="text-center space-y-6">
<p className="text-xl text-gray-300">
{/* <div className="text-center space-y-6"> */}
{/* <p className="text-xl text-gray-300">
Limited spots available! <br />
<span className="text-gray-300 font-semibold text-xl">Register now
to secure your spot. <br /></span>
</p>
<span className="text-gray-300 font-semibold text-xl">
Register now to secure your spot. <br />
</span>
</p> */}

<Link href={"/register"}>
{/* <Link href={"/register"}>
<Button
size="lg"
className="bg-red-600 hover:bg-red-700 mt-4 text-white py-6 px-8 text-xl transition-all duration-300 transform hover:scale-105"
>
Claim Your Spot!
</Button>
</Link>
</div>
</Link> */}
{/* </div> */}
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/scrolling-banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { motion } from "framer-motion";

export default function ScrollingBanner() {
const sentence = " Registrations close soon • ";
const sentence = " Registrations closed • ";
const repeatCount = 20; // Increase this number to add more repetitions

return (
Expand Down
17 changes: 9 additions & 8 deletions src/components/navbar/register-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import { Button } from "../ui/button";

const RegisterButton = () => {
return (
<Link href="/register">
<Button
size="lg"
className="bg-red-600 hover:bg-red-700 text-xl text-white py-6 px-4 transition-all duration-300 transform hover:scale-105"
>
Register Now
</Button>
</Link>
// <Link href="/register">
<Button
size="lg"
disabled
className="bg-red-600 hover:bg-red-700 text-xl text-white py-6 px-4 transition-all duration-300 transform hover:scale-105"
>
Registrations Closed
</Button>
// </Link>
);
};

Expand Down
5 changes: 3 additions & 2 deletions src/components/widget/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,11 @@ const Nav = () => {
<li className="list-none listo leading-[1] font-bold text-white mt-[20px]">
<Button
className="bg-red-600 hover:bg-red-700 text-xl text-white py-6 px-4 transition-all duration-300 transform hover:scale-105"
onClick={handleRegisterClick}
// onClick={handleRegisterClick}
size="lg"
disabled
>
Register Now
Registrations Closed
</Button>
</li>
</ul>
Expand Down
17 changes: 9 additions & 8 deletions src/components/widget/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,15 @@ export default function HeroHighlight() {
</div>

<div className="space-y-4 sm:space-y-0 text-center lg:text-start flex flex-col sm:flex-row justify-center lg:justify-start items-center lg:items-start">
<Link href="/register">
<Button
size="lg"
className="bg-red-600 hover:bg-red-700 text-white py-2 transition-all duration-300 transform hover:scale-105"
>
Register Now
</Button>
</Link>
{/* <Link href="/register"> */}
<Button
disabled
size="lg"
className="bg-red-600 hover:bg-red-700 text-white py-2 transition-all duration-300 transform hover:scale-105"
>
Registrations Closed
</Button>
{/* </Link> */}
</div>
<div className="text-md text-white flex flex-col items-centerv lg:items-start justify-center space-y-2">
<div className="flex items-center justify-center">
Expand Down
Loading