feature - added serverside components and prepared to remove components to make way for jamstack
This commit is contained in:
parent
3565d163af
commit
6158fbc045
|
@ -1,6 +1,4 @@
|
||||||
import PageHeader from "@/sections/PageHeader";
|
import PageHeader from "@/sections/PageHeader";
|
||||||
import BlogCard from "@/components/BlogCard";
|
|
||||||
import getPostMetadata from "@/utils/getPostMetaData";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Footer from "@/components/Footer";
|
import Footer from "@/components/Footer";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import PageHeader from "@/sections/PageHeader";
|
import PageHeader from "@/sections/PageHeader";
|
||||||
import Newsletter from "@/sections/Newsletter/Newsletter";
|
import Newsletter from "@/sections/Newsletter/Newsletter";
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
"use client";
|
|
||||||
import Aos from "aos";
|
|
||||||
import "aos/dist/aos.css";
|
import "aos/dist/aos.css";
|
||||||
import { useEffect } from "react";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { WaitingListWithImageHero } from "@/sections/Hero";
|
import { WaitingListWithImageHero } from "@/sections/Hero";
|
||||||
import PageWrapper from "@/components/Utilities/PageWrapper";
|
import PageWrapper from "@/components/Utilities/PageWrapper";
|
||||||
|
@ -13,15 +10,6 @@ import CardTestemonial from "@/sections/Testemonial/CardTestemonial";
|
||||||
import Payment from "@/sections/Payment";
|
import Payment from "@/sections/Payment";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
useEffect(() => {
|
|
||||||
Aos.init({
|
|
||||||
delay: 50,
|
|
||||||
easing: "ease-out-cubic",
|
|
||||||
once: true,
|
|
||||||
offset: 50,
|
|
||||||
});
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageWrapper>
|
<PageWrapper>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
"use client";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { title } from "@/constants";
|
import { title } from "@/constants";
|
||||||
import Logo from "@/components/Logo";
|
import Logo from "@/components/Logo";
|
||||||
|
@ -15,7 +14,7 @@ function Footer() {
|
||||||
href="#"
|
href="#"
|
||||||
aria-label="Brand"
|
aria-label="Brand"
|
||||||
>
|
>
|
||||||
<Logo href="#" />
|
<Logo />
|
||||||
</Link>
|
</Link>
|
||||||
<p className="mt-3 text-xs sm:text-sm text-base-content">
|
<p className="mt-3 text-xs sm:text-sm text-base-content">
|
||||||
© {new Date().getFullYear()} {title + " "}
|
© {new Date().getFullYear()} {title + " "}
|
||||||
|
@ -191,7 +190,7 @@ function Footer() {
|
||||||
href="#"
|
href="#"
|
||||||
aria-label="Brand"
|
aria-label="Brand"
|
||||||
>
|
>
|
||||||
<Logo href="#" />
|
<Logo />
|
||||||
</Link>
|
</Link>
|
||||||
<p className="mt-1 text-xs sm:text-sm text-base-content">
|
<p className="mt-1 text-xs sm:text-sm text-base-content">
|
||||||
© {new Date().getFullYear()} {title + " "}
|
© {new Date().getFullYear()} {title + " "}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import Link, { LinkProps } from "next/link";
|
|
||||||
import Image, { ImageProps } from "next/image";
|
import Image, { ImageProps } from "next/image";
|
||||||
|
|
||||||
interface LogoProps {
|
interface LogoProps {
|
||||||
|
@ -9,9 +8,9 @@ interface LogoProps {
|
||||||
imageProps?: ImageProps;
|
imageProps?: ImageProps;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Logo({ imageProps, ...props }: LogoProps & LinkProps) {
|
function Logo({ imageProps, ...props }: LogoProps) {
|
||||||
return (
|
return (
|
||||||
<Link
|
<div
|
||||||
className={
|
className={
|
||||||
props.className ?? " flex flex-row items-center justify-center"
|
props.className ?? " flex flex-row items-center justify-center"
|
||||||
}
|
}
|
||||||
|
@ -27,7 +26,7 @@ function Logo({ imageProps, ...props }: LogoProps & LinkProps) {
|
||||||
height={40}
|
height={40}
|
||||||
{...imageProps}
|
{...imageProps}
|
||||||
/>
|
/>
|
||||||
</Link>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import colors, { hexToRgb } from "@/utils/colors";
|
import colors, { hexToRgb } from "@/utils/colors";
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
import React, { ReactNode, useEffect, useState } from "react";
|
import React, { ReactNode, useEffect, useState } from "react";
|
||||||
import Circuit from "@/images/circuit.svg";
|
|
||||||
|
|
||||||
const Background = ({
|
const Background = ({
|
||||||
children,
|
children,
|
||||||
|
@ -15,7 +14,6 @@ const Background = ({
|
||||||
const { theme } = useTheme();
|
const { theme } = useTheme();
|
||||||
const [mounted, setMounted] = useState(false);
|
const [mounted, setMounted] = useState(false);
|
||||||
|
|
||||||
// useEffect only runs on the client, so now we can safely show the UI
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setMounted(true);
|
setMounted(true);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
|
@ -132,7 +132,7 @@ function AccountContent({ user }: ManageSubscriptionProps) {
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
)} */}
|
)} */}
|
||||||
<div className="max-w-6xl mx-auto mb-2 h-full w-full px-6">
|
<div className="max-w-6xl mx-auto mb-12 h-full w-full px-6">
|
||||||
<div className="w-full bg-base-200 p-8 rounded text-base-content">
|
<div className="w-full bg-base-200 p-8 rounded text-base-content">
|
||||||
<h3 className="font-accent text-xl text-secondary mb-2">
|
<h3 className="font-accent text-xl text-secondary mb-2">
|
||||||
Your Subscription
|
Your Subscription
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use client";
|
||||||
|
|
||||||
import pb from "@/lib/pocketbase";
|
import pb from "@/lib/pocketbase";
|
||||||
import { waitinglistValidationSchema } from "@/utils/form";
|
import { waitinglistValidationSchema } from "@/utils/form";
|
||||||
import { yupResolver } from "@hookform/resolvers/yup";
|
import { yupResolver } from "@hookform/resolvers/yup";
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use client";
|
||||||
|
|
||||||
import pb from "@/lib/pocketbase";
|
import pb from "@/lib/pocketbase";
|
||||||
import { newsletterValidationSchema } from "@/utils/form";
|
import { newsletterValidationSchema } from "@/utils/form";
|
||||||
import { yupResolver } from "@hookform/resolvers/yup";
|
import { yupResolver } from "@hookform/resolvers/yup";
|
||||||
|
|
Loading…
Reference in New Issue