2023-06-26 10:07:12 +00:00
|
|
|
import { Metadata } from "next";
|
2024-03-20 17:51:21 +01:00
|
|
|
import { getServerSession } from "app/_lib/authentication";
|
2024-06-05 08:52:41 +02:00
|
|
|
import { Home } from "@link-stack/leafcutter-ui";
|
|
|
|
|
import { getUserVisualizations } from "@link-stack/opensearch-common";
|
|
|
|
|
import { LeafcutterWrapper } from "@link-stack/leafcutter-ui";
|
2023-06-26 10:07:12 +00:00
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
|
|
title: "Link",
|
|
|
|
|
};
|
|
|
|
|
|
2024-03-20 17:51:21 +01:00
|
|
|
export default async function Page() {
|
|
|
|
|
const session = await getServerSession();
|
|
|
|
|
const {
|
|
|
|
|
user: { email },
|
|
|
|
|
}: any = session;
|
|
|
|
|
const visualizations = await getUserVisualizations(email ?? "none", 20);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<LeafcutterWrapper>
|
|
|
|
|
<Home visualizations={visualizations} showWelcome={false} />
|
|
|
|
|
</LeafcutterWrapper>
|
|
|
|
|
);
|
2023-06-26 10:07:12 +00:00
|
|
|
}
|