mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 07:13:29 +00:00
Revert "feat(topics): add the Topics preview area, its navigation entry and its switch"
This reverts commit c68e833dcc.
This commit is contained in:
1 parent
ce0c2a3f3f
commit
c1911e71e3
62 files changed
+212
-4313
No files matched your search
@@ -1,24 +0,0 @@
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
import { TopicDetailView } from "@/components/topics/topic-detail";
|
||||
import { TopicsPreviewGate } from "@/components/topics/topics-preview-gate";
|
||||
import { isTopicKey } from "@/lib/topics/registry";
|
||||
|
||||
/**
|
||||
* `/topics/<topic>` (preview): one topic page. A name that is not a topic is
|
||||
* a 404 here, before anything renders; the preview switch is checked by the
|
||||
* gate, the record's modules by the route behind the page.
|
||||
*/
|
||||
export default async function TopicPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ topic: string }>;
|
||||
}) {
|
||||
const { topic } = await params;
|
||||
if (!isTopicKey(topic)) notFound();
|
||||
return (
|
||||
<TopicsPreviewGate>
|
||||
<TopicDetailView topic={topic} />
|
||||
</TopicsPreviewGate>
|
||||
);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import { TopicsOverview } from "@/components/topics/topics-overview";
|
||||
import { TopicsPreviewGate } from "@/components/topics/topics-preview-gate";
|
||||
|
||||
/**
|
||||
* `/topics` (preview): the topic overview. Exists only for a person who
|
||||
* switched the preview on; see `TopicsPreviewGate`.
|
||||
*/
|
||||
export default function TopicsPage() {
|
||||
return (
|
||||
<TopicsPreviewGate>
|
||||
<TopicsOverview />
|
||||
</TopicsPreviewGate>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user