Use server actions instead of client-side API calls

This commit is contained in:
Darren Clarke 2024-08-05 23:31:15 +02:00
parent 5a3127dcb0
commit aa453954ed
30 changed files with 703 additions and 462 deletions

View file

@ -1,4 +1,5 @@
import { Metadata } from "next";
import { redirect } from "next/navigation";
import { getServerSession } from "app/_lib/authentication";
import { Home } from "@link-stack/leafcutter-ui";
import { getUserVisualizations } from "@link-stack/opensearch-common";
@ -13,11 +14,14 @@ export default async function Page() {
const {
user: { email },
}: any = session;
const visualizations = await getUserVisualizations(email ?? "none", 20);
// const visualizations = await getUserVisualizations(email ?? "none", 20);
redirect("/overview/recent");
/*
return (
<LeafcutterWrapper>
<Home visualizations={visualizations} showWelcome={false} />
</LeafcutterWrapper>
);
*/
}