App directory #4
This commit is contained in:
parent
69706053c6
commit
4d743c5e67
86 changed files with 223 additions and 107 deletions
|
|
@ -17,6 +17,6 @@ type LayoutProps = {
|
|||
export default function Layout({ children }: LayoutProps) {
|
||||
const allHeaders = headers();
|
||||
const embedded = Boolean(allHeaders.get('x-leafcutter-embedded'));
|
||||
console.log({embedded})
|
||||
|
||||
return <InternalLayout embedded={embedded}>{children}</InternalLayout>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
"use client";
|
||||
|
||||
import { FC } from "react";
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
import { RawDataViewer } from "@/app/_components/RawDataViewer";
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
import { getSession } from "next-auth/react";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { authOptions } from "app/_lib/auth";
|
||||
import { getUserVisualizations } from "@/app/_lib/opensearch";
|
||||
import { Home } from "@/app/_components/Home";
|
||||
|
||||
export default async function Page() {
|
||||
const context = undefined;
|
||||
const session = (await getSession(context)) ?? null;
|
||||
const session = await getServerSession(authOptions);
|
||||
const { user: { email } }: any = session;
|
||||
const visualizations = await getUserVisualizations(
|
||||
session?.user?.email ?? "none",
|
||||
email ?? "none",
|
||||
20
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue