Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
rNLKJA committed Jan 14, 2024
1 parent 5a705cc commit 6e6cd80
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 44 deletions.
7 changes: 4 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"presets": ["next/babel", "@babel/preset-env", "@babel/preset-react"],
"presets": [["@babel/preset-env", { "loose": false }]],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
["@babel/plugin-transform-class-properties", { "loose": false }],
["@babel/plugin-transform-private-methods", { "loose": false }],
["@babel/plugin-transform-private-property-in-object", { "loose": false }]
]
}
1 change: 1 addition & 0 deletions components/pages/homepage/HeroSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const HeroHeaderSection = () => {
height={500}
layout="responsive"
quality={50}
priority={true}
/>
</div>

Expand Down
1 change: 1 addition & 0 deletions pages/_document.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Document, { Html, Head, Main, NextScript } from "next/document";
import React from "react";

class MyDocument extends Document {
render() {
Expand Down
56 changes: 15 additions & 41 deletions pages/index.jsx
Original file line number Diff line number Diff line change
@@ -1,48 +1,22 @@
import React, { Suspense } from "react";

import LoadingDots from "@/components/ui/LoadingDots";

const HeroHeaderSection = React.lazy(() =>
import("@/components/pages/homepage/HeroSection"),
);
const AboutSection = React.lazy(() =>
import("@/components/pages/homepage/About"),
);
const GallerySection = React.lazy(() =>
import("@/components/pages/homepage/Gallery"),
);
const CtaSection = React.lazy(() => import("@/components/pages/homepage/CTA"));
const ContactSection = React.lazy(() =>
import("@/components/pages/homepage/Contact"),
);
import React from "react";
import HeroHeaderSection from "@/components/pages/homepage/HeroSection";
import AboutSection from "@/components/pages/homepage/About";
import GallerySection from "@/components/pages/homepage/Gallery";
import CtaSection from "@/components/pages/homepage/CTA";
import ContactSection from "@/components/pages/homepage/Contact";

const Home = () => {
return (
<React.Fragment>
<Suspense
fallback={
<div className="flex justify-center items-center h-screen">
Loading Hero Section...
</div>
}
>
<HeroHeaderSection />
</Suspense>
<Suspense fallback={<LoadingDots />}>
<AboutSection />
</Suspense>

<Suspense fallback={<LoadingDots />}>
<GallerySection />
</Suspense>

<Suspense fallback={<LoadingDots />}>
<CtaSection />
</Suspense>

<Suspense fallback={<LoadingDots />}>
<ContactSection />
</Suspense>
<HeroHeaderSection />
<br />
<AboutSection />
<br />
<GallerySection />
<br />
<CtaSection />
<br />
<ContactSection />
</React.Fragment>
);
};
Expand Down

1 comment on commit 6e6cd80

@vercel
Copy link

@vercel vercel bot commented on 6e6cd80 Jan 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.