Skip to content

Commit

Permalink
chore(apps/web): Dynamically import the Shell component in a client c…
Browse files Browse the repository at this point in the history
…omponent instead
  • Loading branch information
nevendyulgerov committed Jan 6, 2025
1 parent 0310d23 commit 6cffbc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 1 addition & 4 deletions apps/web/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import "@mantine/notifications/styles.css";
import { Analytics } from "@vercel/analytics/react";
import { SpeedInsights } from "@vercel/speed-insights/next";
import { Metadata } from "next";
import dynamic from "next/dynamic";
import type { FC, ReactNode } from "react";
import { Providers } from "../providers/providers";
import { Shell } from "../components/layout/shell-container";

export const metadata: Metadata = {
title: {
Expand All @@ -22,9 +22,6 @@ export const metadata: Metadata = {
},
};

const Shell = dynamic(() => import("../components/layout/shell"), {
ssr: false,
});
interface LayoutProps {
children: ReactNode;
}
Expand Down
6 changes: 6 additions & 0 deletions apps/web/src/components/layout/shell-container.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"use client";
import dynamic from "next/dynamic";

export const Shell = dynamic(() => import("./shell"), {
ssr: false,
});

0 comments on commit 6cffbc5

Please sign in to comment.