Added next dynamic import to sections on pages

This commit is contained in:
Caretaker0699 2023-04-20 13:03:48 -07:00
parent e587053eca
commit f2e387f9d3
6 changed files with 41 additions and 13 deletions

View File

@ -1,7 +1,13 @@
import React from "react";
import Navbar from "../Components/Layout/navbar.jsx";
import Section from "../Components/Layout/section.jsx";
import ContactFormSection from "@/Components/Layout/ContactFormSection.jsx";
import dynamic from "next/dynamic";
const Section = dynamic(() => import("../Components/Layout/section.jsx"));
const ContactFormSection = dynamic(() =>
import("../Components/Layout/ContactFormSection.jsx")
);
export default function Home() {
return (
<>

View File

@ -1,7 +1,11 @@
import React from "react";
import Navbar from "../Components/Layout/navbar.jsx";
import Section from "../Components/Layout/section.jsx"
import ContactFormSection from "@/Components/Layout/ContactFormSection.jsx";
import dynamic from "next/dynamic";
const ContactFormSection = dynamic(() =>
import("../Components/Layout/ContactFormSection.jsx")
);
export default function Home() {
return (

View File

@ -1,7 +1,13 @@
import React from "react";
import Navbar from "../Components/Layout/navbar.jsx";
import Section from "../Components/Layout/section.jsx"
import ContactFormSection from "@/Components/Layout/ContactFormSection.jsx";
import dynamic from "next/dynamic";
const Section = dynamic(() => import("../Components/Layout/section.jsx"));
const ContactFormSection = dynamic(() =>
import("../Components/Layout/ContactFormSection.jsx")
);
export default function Home() {
return (

View File

@ -1,7 +1,11 @@
import React from "react";
import Navbar from "../Components/Layout/navbar.jsx";
import Section from "../Components/Layout/section.jsx"
import ContactFormSection from "@/Components/Layout/ContactFormSection.jsx";
import dynamic from "next/dynamic";
const Section = dynamic(() => import("../Components/Layout/section.jsx"));
const ContactFormSection = dynamic(() =>
import("../Components/Layout/ContactFormSection.jsx")
);
export default function Home() {
return (

View File

@ -1,8 +1,11 @@
import React from "react";
import Navbar from "../Components/Layout/navbar.jsx";
import Section from "../Components/Layout/section.jsx"
import ContactFormSection from "@/Components/Layout/ContactFormSection.jsx";
import dynamic from "next/dynamic";
const Section = dynamic(() => import("../Components/Layout/section.jsx"));
const ContactFormSection = dynamic(() =>
import("../Components/Layout/ContactFormSection.jsx")
);
export default function Home() {
return (

View File

@ -1,7 +1,12 @@
import React from "react";
import Navbar from "../Components/Layout/navbar.jsx";
import Section from "../Components/Layout/section.jsx"
import ContactFormSection from "@/Components/Layout/ContactFormSection.jsx";
import dynamic from "next/dynamic";
const Section = dynamic(() => import("../Components/Layout/section.jsx"));
const ContactFormSection = dynamic(() =>
import("../Components/Layout/ContactFormSection.jsx")
);
export default function Home() {
return (