blob: ed0b16c0cdf71ebae46cbd05e12dd7104efa0eb0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import type { Metadata } from "next";
import AllHighlights from "@/components/dashboard/highlights/AllHighlights";
import { useTranslation } from "@/lib/i18n/server";
import { api } from "@/server/api/client";
import { Highlighter } from "lucide-react";
export async function generateMetadata(): Promise<Metadata> {
// oxlint-disable-next-line rules-of-hooks
const { t } = await useTranslation();
return {
title: `${t("common.highlights")} | Karakeep`,
};
}
export default async function HighlightsPage() {
// oxlint-disable-next-line rules-of-hooks
const { t } = await useTranslation();
const highlights = await api.highlights.getAll({});
return (
<div className="flex flex-col gap-4">
<div className="flex items-center">
<Highlighter className="mr-2" />
<p className="text-2xl">{t("common.highlights")}</p>
</div>
<div className="flex flex-col gap-8 rounded-md border bg-background p-4">
<AllHighlights highlights={highlights} />
</div>
</div>
);
}
|