-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from rajkaranm/404-page
add: added page not found page
- Loading branch information
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
"use client"; | ||
import { theme } from "@/types"; | ||
import { useThemeContext } from "./context/store"; | ||
import { useEffect } from "react"; | ||
import Link from "next/link"; | ||
import Image from "next/image"; | ||
import pageNotFound from "../public/page404.png"; | ||
export default function NotFound() { | ||
// Dark Mode | ||
const { theme }: theme = useThemeContext(); | ||
|
||
useEffect(() => { | ||
if (theme === "dark") { | ||
document.documentElement.classList.add("dark"); | ||
} else { | ||
document.documentElement.classList.remove("dark"); | ||
} | ||
}, [theme]); | ||
return ( | ||
<div className="flex flex-col items-center xl:flex-row xl:items-start justify-around bg-[--light-bg] dark:bg-[--dark-bg] text-[--dark-bg] dark:text-[--light-bg] md:ms-16 md:my-16 mt-10 m-5"> | ||
<div> | ||
<h1 className="md:w-[42rem] font-bold text-3xl md:text-5xl">Sorry, we can't find that page</h1> | ||
<div className="md:w-[30rem]"> | ||
<p className="text-xl md:text-2xl mt-7"> | ||
Ahoy, it seems you've ventured into uncharted territory. | ||
</p> | ||
<p className="text-xl md:text-2xl mt-7">Feel free to navigate back to the <Link className="underline hover:decoration-[--primary-color] decoration-0 underline-offset-2" href="/"> | ||
Homepage | ||
</Link> or click on any of the tabs above.</p> | ||
</div> | ||
|
||
</div> | ||
<div className="mt-24"> | ||
<Image | ||
src={pageNotFound} | ||
alt="404 page image" | ||
width={600} | ||
height={300} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {} | ||
const nextConfig = { | ||
trailingSlash: true | ||
} | ||
|
||
module.exports = nextConfig |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76aba2a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
aifusion – ./
aifusion.vercel.app
aifusion-git-main-priyansu.vercel.app
aifusion-priyansu.vercel.app