couple more fixes
All checks were successful
Build / build (push) Successful in 2m25s

This commit is contained in:
Nareshkumar Rao 2025-04-05 01:12:38 +02:00
parent f640afbcb1
commit 82ce4b345a
3 changed files with 25 additions and 20 deletions

View File

@ -1,16 +1,14 @@
/* eslint-disable react/no-unescaped-entities */
export default function About() {
return (
<>
so hey, i'm naresh!
so hey, i&apos;m naresh!
<br />
<br />
i'm an engineer and i love building things and tinkering on things.
i&apos;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&apos;ll write more here later.
</>
);
}

View File

@ -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,13 +45,23 @@ export default async function Blog({
<span style={{ fontSize: 18 }}>naresh writes</span>
<span style={{ fontSize: 12 }}>...occasionally</span>
</div>
<TagOverview tags={tags} currentTag={currentTag} />
{metadata
.filter((m) => loggedIn || !m.is_draft)
.map((m) => (
<PostSummary metadata={m} key={m.slug} loggedIn={loggedIn} />
))}
<Pagination numberOfPages={numberOfPages} pageNumber={pageNumber} />
{pageNumber > numberOfPages ? (
<div style={{ marginTop: "1rem" }}>
ah fuck.
<br /> it seems like i haven&apos;t written anything yet
<br /> so much for a blog, eh?
</div>
) : (
<>
<TagOverview tags={tags} currentTag={currentTag} />
{metadata
.filter((m) => loggedIn || !m.is_draft)
.map((m) => (
<PostSummary metadata={m} key={m.slug} loggedIn={loggedIn} />
))}
<Pagination numberOfPages={numberOfPages} pageNumber={pageNumber} />
</>
)}
<ActionButtons loggedIn={loggedIn} />
</>
);

View File

@ -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&apos;re here
<br />
i'll look into it, at some point
i&apos;ll look into it, at some point
<br />
but for now, maybe you'd like to
but for now, maybe you&apos;d like to
<br />
<br />
<Link