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