Skip to content

Commit

Permalink
Fix metadata error
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio Chessa committed Sep 5, 2023
1 parent a413bc1 commit 9dadb76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/app/reporting/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
'use client'

import { useState } from 'react';

import { ProtectedPage } from "@/features/auth/protected-page";
import { MainMenu } from "@/features/menu/menu";
import { RptContext } from "./rpt-context";
import { AI_NAME } from "@/features/theme/customise";

export const metadata = {
Expand All @@ -16,10 +12,9 @@ export default function RootLayout({
}: {
children: React.ReactNode;
}) {
const [isOpen, setIsOpen] = useState(false);
return (
<ProtectedPage>
<MainMenu isOpen={isOpen} setIsOpen={setIsOpen} />
<RptContext/>
<div className="flex-1">{children}</div>
</ProtectedPage>
);
Expand Down
12 changes: 12 additions & 0 deletions src/app/reporting/rpt-context.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use client'

import { useState } from 'react';

import { MainMenu } from "@/features/menu/menu";

export const RptContext = () => {
const [isOpen, setIsOpen] = useState(false);
return (
<MainMenu isOpen={isOpen} setIsOpen={setIsOpen} />
)
}

0 comments on commit 9dadb76

Please sign in to comment.