Skip to main content

add-new-layout-component-nextjs-complete

tip

This section gets you to activating classification as quickly as possible. It does not explain each line of code.

Add the following file:

/src/components/HomeLayout.jsx
import Head from "next/head";

import Body from "./Body";
import Footer from "./Footer";

import { Personalize } from '@uniformdev/context-react';
import variants from "../../content/home-variants.json";

export default function HomeLayout({ fields }) {
const { title } = fields;
return (
<div className="container">
<Head>
<title>{title}</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<Personalize
variations={variants}
name="bodyPersonalized"
component={Body}
/>
<Footer />
</div>
);
}