Repo cleanup and updates
This commit is contained in:
parent
3a1063e40e
commit
99f8d7e2eb
72 changed files with 11857 additions and 16439 deletions
|
|
@ -7,13 +7,11 @@ import { SetupModeWarning } from "./SetupModeWarning";
|
|||
|
||||
interface InternalLayoutProps extends PropsWithChildren {
|
||||
setupModeActive: boolean;
|
||||
leafcutterEnabled: boolean;
|
||||
}
|
||||
|
||||
export const InternalLayout: FC<InternalLayoutProps> = ({
|
||||
children,
|
||||
setupModeActive,
|
||||
leafcutterEnabled,
|
||||
}) => {
|
||||
const [open, setOpen] = useState(true);
|
||||
|
||||
|
|
@ -24,7 +22,6 @@ export const InternalLayout: FC<InternalLayoutProps> = ({
|
|||
<Sidebar
|
||||
open={open}
|
||||
setOpen={setOpen}
|
||||
leafcutterEnabled={leafcutterEnabled}
|
||||
/>
|
||||
<Grid
|
||||
item
|
||||
|
|
|
|||
|
|
@ -176,13 +176,11 @@ const MenuItem = ({
|
|||
interface SidebarProps {
|
||||
open: boolean;
|
||||
setOpen: (open: boolean) => void;
|
||||
leafcutterEnabled?: boolean;
|
||||
}
|
||||
|
||||
export const Sidebar: FC<SidebarProps> = ({
|
||||
open,
|
||||
setOpen,
|
||||
leafcutterEnabled = false,
|
||||
}) => {
|
||||
const pathname = usePathname();
|
||||
const { data: session } = useSession();
|
||||
|
|
@ -372,11 +370,11 @@ export const Sidebar: FC<SidebarProps> = ({
|
|||
}}
|
||||
>
|
||||
<MenuItem
|
||||
name="Dashboards"
|
||||
href="/dashboards"
|
||||
name="Dashboard"
|
||||
href="/"
|
||||
Icon={InsightsIcon}
|
||||
iconSize={20}
|
||||
selected={pathname.startsWith("/dashboards")}
|
||||
selected={pathname === "/"}
|
||||
open={open}
|
||||
/>
|
||||
<MenuItem
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import { FC } from "react";
|
|||
import { Grid } from "@mui/material";
|
||||
import Iframe from "react-iframe";
|
||||
|
||||
const docsUrl = "https://digiresilience.org/docs/link/about/";
|
||||
|
||||
export const DocsWrapper: FC = () => (
|
||||
<Grid
|
||||
container
|
||||
|
|
@ -17,7 +19,7 @@ export const DocsWrapper: FC = () => (
|
|||
>
|
||||
<Iframe
|
||||
id="docs"
|
||||
url={"https://digiresilience.org/docs/link/about/"}
|
||||
url={docsUrl}
|
||||
width="100%"
|
||||
height="100%"
|
||||
frameBorder={0}
|
||||
|
|
|
|||
|
|
@ -12,12 +12,10 @@ type LayoutProps = {
|
|||
|
||||
export default function Layout({ children }: LayoutProps) {
|
||||
const setupModeActive = process.env.SETUP_MODE === "true";
|
||||
const leafcutterEnabled = process.env.LEAFCUTTER_ENABLED === "true";
|
||||
|
||||
return (
|
||||
<InternalLayout
|
||||
setupModeActive={setupModeActive}
|
||||
leafcutterEnabled={leafcutterEnabled}
|
||||
>
|
||||
{children}
|
||||
</InternalLayout>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { Metadata } from "next";
|
|||
import { DefaultDashboard } from "./_components/DefaultDashboard";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "CDR Link - Home",
|
||||
title: "CDR Link - Dashboard",
|
||||
};
|
||||
|
||||
export default async function Page() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue