feat: use app router for home topic
This commit is contained in:
parent
bdea09ae7d
commit
3ffe814abd
|
|
@ -0,0 +1,31 @@
|
|||
import { HomeFeed } from "~/components/home/HomeFeed"
|
||||
import { HomeSidebar } from "~/components/home/HomeSidebar"
|
||||
|
||||
import topics from "../../../../../data/topics.json"
|
||||
|
||||
function Topic({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
topic: string
|
||||
}
|
||||
}) {
|
||||
const info = topics.find((t) => t.name === params.topic)
|
||||
|
||||
return (
|
||||
<section className="pt-24">
|
||||
<div className="max-w-screen-lg px-5 mx-auto flex">
|
||||
<div className="flex-1 min-w-[300px]">
|
||||
<h2 className="text-3xl font-bold">Topic: {params.topic}</h2>
|
||||
<p className="text-zinc-400 mt-4">{info?.description}</p>
|
||||
<div className="mt-10">
|
||||
<HomeFeed type="topic" noteIds={info?.notes} />
|
||||
</div>
|
||||
</div>
|
||||
<HomeSidebar />
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
export default Topic
|
||||
|
|
@ -259,7 +259,7 @@ export const HomeFeed: React.FC<{
|
|||
|
||||
return (
|
||||
<>
|
||||
<Tabs items={tabs} className="border-none text-lg"></Tabs>
|
||||
{!type && <Tabs items={tabs} className="border-none text-lg"></Tabs>}
|
||||
<div className="space-y-10">
|
||||
{hasFiltering && (
|
||||
<div className="flex items-center text-zinc-500">
|
||||
|
|
|
|||
Loading…
Reference in New Issue