Skip to content

Commit

Permalink
404 page added.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrswastik-robot committed Mar 23, 2024
1 parent c12ba7c commit c93f217
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions app/404/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react'

type Props = {}

const ErrorPage = (props: Props) => {
return (
<div className=' flex items-center justify-center mx-auto my-[15%]'>
<h1 className=' text-3xl font-bold'>404 - Page Not Found</h1>
</div>
)
}

export default ErrorPage
1 change: 1 addition & 0 deletions app/[postTitle]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ const PostPage = ({ params: { postTitle } }: Props) => {
};
} else {
console.log("No such document!");
router.push("/404");
}
});
}, [postTitleWithSpaces, postTitle]);
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { GeistSans } from 'geist/font/sans';
const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
title: "Devotional-B",
title: "Devotional-B - A website devoted to devotees.",
description: "Get all your answers here.",
openGraph: {
title: "Devotional-B",
Expand Down

0 comments on commit c93f217

Please sign in to comment.