import Head from "next/head";
import Image from "next/image";
import { Inter } from "@next/font/google";
import styles from "../styles/Home.module.css";
import Layout from "../layouts/Layout";
const inter = Inter({ subsets: ["latin"] });
export default function Home() {
return (
<>
<div className="m-5">
<div className="bg-white h-[400px] flex justify-center items-center text-4xl">
Welcome to Dashboard
</div>
</div>
</>
);
}
Home.getLayout = function getLayout(page) {
return <Layout>{page}</Layout>;
};
export async function getStaticProps() {
return { props: { title: "HomePage" } };
}
I need to pass props from getStaticprops to Layout Component. i tried to pass as props but it doesnt working. Can someone help eith this?