Skip to content
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
1,952 changes: 0 additions & 1,952 deletions bun.lock

This file was deleted.

28 changes: 23 additions & 5 deletions src/app/error.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
"use client";

export default function ErrorPage() {
import { Button } from "@/components/ui/button";
import { useRouter } from "next/navigation";

interface ErrorPageProps {
error: Error & { digest?: string };
reset: () => void;
}
export default function ErrorPage({ error, reset }: ErrorPageProps) {
// Log error for debugging in development
if (process.env.NODE_ENV === "development") {
// eslint-disable-next-line no-console
console.error("Error caught:", error);
}
const router = useRouter();
return (
<div className="min-h-screen bg-slate-900 ">
{/* Main Error */}
<div className="h-screen flex flex-col items-center justify-center">
{/* Error Header */}
<div className="h-screen max-w-2xl mx-auto p-4 flex flex-col items-center justify-center">
<div className="flex items-center justify-center mb-6">
<h1 className="text-4xl text-white mr-2">500 |</h1>
<p className="text-lg text-white">Internal Server Error</p>
</div>

{/* Error Message */}
<p className="text-sm text-white">
We’re having trouble right now. Please refresh the page or try again
later.
</p>
<div className="flex lg:flex-row flex-col max-w-md my-4 gap-4">
<Button variant="destructive" onClick={reset}>
Try Again
</Button>
<Button variant="secondary" onClick={() => router.back()}>
Go Back
</Button>
</div>
</div>
</div>
);
Expand Down
19 changes: 10 additions & 9 deletions src/app/home/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React from "react";
// import ErrorTest from "@/components/ErrorTest";
import CourseExplorationSection from "./components/welcomepage/courseExplorationSection";
import HeroSection from "./components/welcomepage/heroSection";
// import Register from "../register/page";
import Trusted from "./components/welcomepage/trusted";
import Journey from "./components/welcomepage/journey";
import Steller from "./components/welcomepage/steller";
import Ready from "./components/welcomepage/ready";
import Steller from "./components/welcomepage/steller";
// import PrinciplesSection from "../about/components/principlesSection";
import Trusted from "./components/welcomepage/trusted";
// import PrinciplesSection from "../about/components/principlesSection";

const welcomePage = () => {
Expand All @@ -17,7 +18,7 @@ const welcomePage = () => {
<Journey />
<CourseExplorationSection />
<Steller />

{/* <ErrorTest /> */}
{/* <section className="mt-4 md:mt-20 ">
<Ready />
</div>
Expand Down Expand Up @@ -59,6 +60,7 @@ export default welcomePage;
"Fast and secure transactions",
"Low transaction fee",
"Global accessibility",
"Global accessibility",
"Easy integration with our platform",
].map((item, index) => (
<li key={index} className="list-disc">
Expand All @@ -83,12 +85,9 @@ export default welcomePage;
</div>
</div>
</div>
</section> */
}

</section> */}

{
/* <section className="mt-4 md:mt-10 ">
{/* <section className="mt-4 md:mt-10 ">
<div className="w-full md:w-7/12 mx-auto grid gap-2">
{" "}
<h3 className="text-center font-medium text-2xl text-purple-600 md:text-4xl">
Expand Down Expand Up @@ -119,3 +118,5 @@ export default welcomePage;

export default welcomePage;

// </section> */
// }
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function RootLayout({
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased bg-[#111627]`}
>
<NavbarMenu variant="default" />
<NavbarMenu />
<Toaster position="top-right" richColors />
<main className="flex flex-col min-h-screen p1">{children}</main>
<Footer />
Expand Down
2 changes: 2 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import ErrorTest from "@/components/ErrorTest";
import WelcomePage from "./home/page";

export default function Page() {
return (
<div className="">
<WelcomePage />
<ErrorTest />
</div>
);
}
24 changes: 24 additions & 0 deletions src/components/ErrorTest.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"use client";

import { useState } from "react";

export default function ErrorTest() {
const [shouldThrow, setShouldThrow] = useState(false);

if (shouldThrow) {
throw new Error("Test error!");
}

return (
<div className="fixed bottom-4 right-4 z-50">
<div className="bg-gray-800 border border-gray-600 rounded-lg p-3 shadow-lg">
<button
onClick={() => setShouldThrow(true)}
className="px-3 py-1 bg-red-500 text-white text-sm rounded hover:bg-red-600 transition-colors"
>
🧪 Test Error
</button>
</div>
</div>
);
}