fix(doc): migrated ScriptProvider component from the root level to each decendant folder

This commit is contained in:
HaRuki Kuriwada 2024-06-17 15:57:12 +09:00 committed by Junior Garcia
parent 996a0ed128
commit 69db63cd8f
4 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,7 @@
import {Image} from "@nextui-org/react";
import {ScriptProviders} from "@/components/scripts/script-providers";
interface DocsLayoutProps {
children: React.ReactNode;
}
@ -22,6 +24,8 @@ export default function DocsLayout({children}: DocsLayoutProps) {
>
<Image removeWrapper alt="docs right background" src="/gradients/docs-right.png" />
</div>
<ScriptProviders />
</>
);
}

View File

@ -2,6 +2,7 @@ import {Image} from "@nextui-org/react";
import manifest from "@/config/routes.json";
import {DocsSidebar} from "@/components/docs/sidebar";
import {ScriptProviders} from "@/components/scripts/script-providers";
interface DocsLayoutProps {
children: React.ReactNode;
@ -30,6 +31,8 @@ export default function DocsLayout({children}: DocsLayoutProps) {
>
<Image removeWrapper alt="docs right background" src="/gradients/docs-right.png" />
</div>
<ScriptProviders />
</>
);
}

View File

@ -2,6 +2,7 @@ import {Image} from "@nextui-org/react";
import {Blockquote} from "@/components/docs/components/blockquote";
import {FigmaButton} from "@/components/figma-button";
import {ScriptProviders} from "@/components/scripts/script-providers";
export default function FigmaPage() {
return (
@ -43,6 +44,8 @@ export default function FigmaPage() {
>
<Image removeWrapper alt="docs right background" src="/gradients/docs-right.png" />
</div>
<ScriptProviders />
</>
);
}

View File

@ -12,7 +12,6 @@ import {fontSans} from "@/config/fonts";
import {Navbar} from "@/components/navbar";
import {Footer} from "@/components/footer";
import {ProBanner} from "@/components/pro-banner";
import {ScriptProviders} from "@/components/scripts/script-providers";
export const metadata: Metadata = {
title: {
@ -77,7 +76,6 @@ export default function RootLayout({children}: {children: React.ReactNode}) {
</div>
<Cmdk />
</Providers>
<ScriptProviders />
</body>
</html>
);