Files
reflector/www/app/(app)/layout.tsx
Sergey Mankovsky f6cc03286b fix: upgrade to nextjs 16 (#888)
* Upgrade to nextjs 16

* Update sentry config

* Force dynamic for health route

* Upgrade eslint config

* Upgrade jest

* Move types to dev dependencies

* Remove pages from tailwind config

* Replace img with next image
2026-02-27 17:18:03 +01:00

94 lines
2.4 KiB
TypeScript

import { Container, Flex } from "@chakra-ui/react";
import { featureEnabled } from "../lib/features";
import NextLink from "next/link";
import Image from "next/image";
import UserInfo from "../(auth)/userInfo";
import AuthWrapper from "./AuthWrapper";
import { RECORD_A_MEETING_URL } from "../api/urls";
export default async function AppLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<Container
minW="100vw"
maxH="100vh"
minH="100vh"
maxW="container.xl"
display="grid"
gridTemplateRows="auto minmax(0,1fr)"
>
<Flex
as="header"
justify="space-between"
alignItems="center"
w="100%"
py="2"
px="0"
mt="1"
>
{/* Logo on the left */}
<NextLink href="/" className="flex">
<Image
src="/reach.svg"
width={32}
height={40}
className="h-11 w-auto"
alt="Reflector"
/>
<div className="hidden flex-col ml-3 md:block">
<h1 className="text-[28px] font-semibold leading-tight">
Reflector
</h1>
<p className="text-gray-500 text-xs tracking-tight -mt-1">
Capture the signal, not the noise
</p>
</div>
</NextLink>
<div>
{/* Text link on the right */}
<NextLink href={RECORD_A_MEETING_URL} className="font-light px-2">
Create
</NextLink>
{featureEnabled("browse") ? (
<>
&nbsp;·&nbsp;
<NextLink href="/browse" className="font-light px-2">
Browse
</NextLink>
</>
) : (
<></>
)}
{featureEnabled("rooms") ? (
<>
&nbsp;·&nbsp;
<NextLink href="/rooms" className="font-light px-2">
Rooms
</NextLink>
</>
) : (
<></>
)}
{featureEnabled("requireLogin") ? (
<>
&nbsp;·&nbsp;
<NextLink href="/settings/api-keys" className="font-light px-2">
Settings
</NextLink>
&nbsp;·&nbsp;
<UserInfo />
</>
) : (
<></>
)}
</div>
</Flex>
<AuthWrapper>{children}</AuthWrapper>
</Container>
);
}