This commit is contained in:
		| @@ -1,16 +1,14 @@ | ||||
| /* eslint-disable react/no-unescaped-entities */ | ||||
|  | ||||
| export default function About() { | ||||
|   return ( | ||||
|     <> | ||||
|       so hey, i'm naresh! | ||||
|       so hey, i'm naresh! | ||||
|       <br /> | ||||
|       <br /> | ||||
|       i'm an engineer and i love building things and tinkering on things. | ||||
|       i'm an engineer and i love building things and tinkering on things. | ||||
|       <br /> | ||||
|       <br /> i like going on runs and going for rides on my bike. | ||||
|       <br /> | ||||
|       <br /> umm, maybe i'll write more here later. | ||||
|       <br /> umm, maybe i'll write more here later. | ||||
|     </> | ||||
|   ); | ||||
| } | ||||
|   | ||||
| @@ -20,6 +20,7 @@ export default async function Blog({ | ||||
|   const pageNumber = await getPageNumber(searchParams); | ||||
|   const { tag } = await params; | ||||
|   const currentTag = tag != null && tag.length >= 1 ? tag[0] : null; | ||||
|  | ||||
|   if ((tag?.length ?? 0) > 1) { | ||||
|     notFound(); | ||||
|   } | ||||
| @@ -28,9 +29,7 @@ export default async function Blog({ | ||||
|     pageNumber, | ||||
|     currentTag | ||||
|   ); | ||||
|   if (pageNumber > numberOfPages) { | ||||
|     notFound(); | ||||
|   } | ||||
|  | ||||
|   const loggedIn = (await auth())?.user != null; | ||||
|   const tags = await getTags(loggedIn); | ||||
|  | ||||
| @@ -46,6 +45,14 @@ export default async function Blog({ | ||||
|         <span style={{ fontSize: 18 }}>naresh writes</span> | ||||
|         <span style={{ fontSize: 12 }}>...occasionally</span> | ||||
|       </div> | ||||
|       {pageNumber > numberOfPages ? ( | ||||
|         <div style={{ marginTop: "1rem" }}> | ||||
|           ah fuck. | ||||
|           <br /> it seems like i haven't written anything yet | ||||
|           <br /> so much for a blog, eh? | ||||
|         </div> | ||||
|       ) : ( | ||||
|         <> | ||||
|           <TagOverview tags={tags} currentTag={currentTag} /> | ||||
|           {metadata | ||||
|             .filter((m) => loggedIn || !m.is_draft) | ||||
| @@ -53,6 +60,8 @@ export default async function Blog({ | ||||
|               <PostSummary metadata={m} key={m.slug} loggedIn={loggedIn} /> | ||||
|             ))} | ||||
|           <Pagination numberOfPages={numberOfPages} pageNumber={pageNumber} /> | ||||
|         </> | ||||
|       )} | ||||
|       <ActionButtons loggedIn={loggedIn} /> | ||||
|     </> | ||||
|   ); | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| /* eslint-disable react/no-unescaped-entities */ | ||||
|  | ||||
| import { titleFont } from "@/components/fonts"; | ||||
| import Link from "next/link"; | ||||
|  | ||||
| @@ -11,11 +9,11 @@ export default function NotFound() { | ||||
|       </span> | ||||
|       <br /> | ||||
|       <br /> | ||||
|       shit... something is fucked and now you're here | ||||
|       shit... something is fucked and now you're here | ||||
|       <br /> | ||||
|       i'll look into it, at some point | ||||
|       i'll look into it, at some point | ||||
|       <br /> | ||||
|       but for now, maybe you'd like to | ||||
|       but for now, maybe you'd like to | ||||
|       <br /> | ||||
|       <br /> | ||||
|       <Link | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Nareshkumar Rao
					Nareshkumar Rao