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

404/500 #57

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion src/app/admin/participants/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import React from "react";
const ParticipantsPage = () => {
return (
<div className="w-11/12">
<Participants />
<div className="lg:w-[88%]">
<Participants />
</div>
</div>
);
};
Expand Down
6 changes: 4 additions & 2 deletions src/app/admin/statistics/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import Title from "@/app/components/Title";

const StatisticsPage = () => {
return (
<div>
<Title title="Statistics" />
<div className="w-11/12">
<div className="lg:w-[88%]">
<Title title="Statistics" />
</div>
</div>
);
};
Expand Down
5 changes: 3 additions & 2 deletions src/app/admin/teams/page.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
"use client";
import Teams from "@/app/components/Teams";
import React from "react";

const TeamsPage = () => {
return (
<div className="w-11/12">
<Teams />
<div className="lg:w-[88%]">
<Teams />
</div>
</div>
);
};
Expand Down
27 changes: 27 additions & 0 deletions src/app/error.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"use client";

import { useEffect } from "react";

export default function Error({ error }) {
useEffect(() => {
console.error(error);
}, [error]);

return (
<div className="w-screen h-screen flex flex-col items-center justify-center fixed">
<p className="text-center text-6xl font-bold text-hackathon-blue-100">
500
</p>
<p className="text-center text-lg md:text-2xl font-bold text-black">
{error.message}
</p>
<p className="text-center text-sm md:text-lg text-hackathon-blue-200"></p>
<button
onClick={() => reset()}
className="text-center text-base md:text-xl font-bold text-hackathon-green-200 no-underline"
>
Back To Home Page
</button>
</div>
);
}
2 changes: 1 addition & 1 deletion src/app/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function RootLayout({ children }) {
<html lang="en">
<body className={`${poppins.variable} flex flex-col lg:flex-row`}>
<Navigation />
<div className="flex justify-center items-start w-full lg:w-[88%] bg-hackathon-page z-0">
<div className="flex justify-center items-start w-full bg-hackathon-page z-0">
{children}
</div>
</body>
Expand Down
25 changes: 25 additions & 0 deletions src/app/not-found.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from "react";

const error = () => {
return (
<div className="w-screen h-screen flex flex-col items-center justify-center fixed">
<p className="text-center text-6xl font-bold text-hackathon-blue-100">
404
</p>
<p className="text-center text-lg md:text-2xl font-bold text-black">
Page Not Found
</p>
<p className="text-center text-sm md:text-lg text-hackathon-blue-200">
The page you are looking for does not seem to exist
</p>
<a
href="/"
className="text-center text-base md:text-xl font-bold text-hackathon-green-200 no-underline"
>
Back To Home Page
</a>
</div>
);
};

export default error;