Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the CarGraphicComponent SSR instead of the HeroComponent #80

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion client/src/components/containers/HeroContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import dynamic from "next/dynamic";

import BatteryThrottleComponent from "@/components/molecules/HeroMolecules/BatteryThrottleComponent";
import CarGraphicComponent from "@/components/molecules/HeroMolecules/CarGraphicComponent";
import FaultsComponent from "@/components/molecules/HeroMolecules/FaultsComponent";
import GearParkBrakeComponent from "@/components/molecules/HeroMolecules/GearParkBrakeComponent";

const CarGraphicComponent = dynamic(
() =>
import("@/components/molecules/HeroMolecules/CarGraphicComponent").then(
(mod) => mod.default,
),
{
ssr: false,
},
);

function HeroContainer(props: any) {
return (
<>
Expand Down
10 changes: 1 addition & 9 deletions client/src/pages/[[...slug]].tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
import dynamic from "next/dynamic";
import { Inter } from "next/font/google";

import BottomInformationContainer from "@/components/containers/BottomInformationContainer";
import HeroContainer from "@/components/containers/HeroContainer";
import LogoStatusContainer from "@/components/containers/LogoStatusContainer";
import MapContainer from "@/components/containers/MapContainer";
import TabsContainer from "@/components/containers/TabsContainer";
import { useAppState } from "@/contexts/AppStateContext";

const inter = Inter({ subsets: ["latin"] });

const HeroContainer = dynamic(
() =>
import("@/components/containers/HeroContainer").then((mod) => mod.default),
{
ssr: false,
},
);

export default function Home() {
const { currentAppState } = useAppState();
// 38, 55, 7
Expand Down
Loading