forked from transitive-bullshit/nextjs-notion-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Error Page, Fixing Some Issue (transitive-bullshit#63)
* feat: add profile in post card component * feat: style post header * fix: updating profile_photo undefind check * feat: adding 404 page * feat: adding thumbnail in post detail page * fix: using default next image loader * fix: fixing user name issue
- Loading branch information
1 parent
392b546
commit fe63b24
Showing
13 changed files
with
145 additions
and
69 deletions.
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
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,6 +1,6 @@ | ||
module.exports = { | ||
reactStrictMode: false, | ||
images: { | ||
loader: 'custom', | ||
domains: ['www.notion.so', 'lh5.googleusercontent.com'], | ||
}, | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,25 @@ | ||
import Image from 'next/image' | ||
import React from 'react' | ||
|
||
type Props = { | ||
errorType?: 'NOT_FOUND' | 'UNKNOWN' | ||
} | ||
|
||
const CustomError: React.FC<Props> = ({ errorType }) => { | ||
return ( | ||
<div | ||
className={`m-auto max-w-4xl bg-white dark:bg-zinc-700 rounded-3xl py-12 px-6 shadow-md`} | ||
> | ||
<div className="py-20 flex flex-col items-center gap-10"> | ||
<div className="text-6xl flex items-center"> | ||
<div>4</div> | ||
<Image src="/images/error.png" width={60} height={60} alt="error" /> | ||
<div>4</div> | ||
</div> | ||
<div className="text-3xl text-gray-500">Post not found</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default CustomError |
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
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
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
This file was deleted.
Oops, something went wrong.
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
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,32 @@ | ||
import Layout from '@components/Layout' | ||
import Feed from '@containers/Feed' | ||
import CONFIG from '../../morethan-log.config' | ||
import { NextPageWithLayout } from './_app' | ||
import { TPosts, TTags } from '../types' | ||
import CustomError from '../containers/CustomError' | ||
|
||
type Props = { | ||
tags: TTags | ||
posts: TPosts | ||
} | ||
|
||
const NotFoundPage: NextPageWithLayout<Props> = () => { | ||
return <CustomError /> | ||
} | ||
|
||
NotFoundPage.getLayout = function getlayout(page) { | ||
return ( | ||
<Layout | ||
metaConfig={{ | ||
title: CONFIG.blog.title, | ||
description: CONFIG.blog.description, | ||
type: 'website', | ||
url: CONFIG.link, | ||
}} | ||
> | ||
{page} | ||
</Layout> | ||
) | ||
} | ||
|
||
export default NotFoundPage |
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
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