From f2f8f9cf76285cf3c78b101d9530eacbc42d22c2 Mon Sep 17 00:00:00 2001 From: Walidoux Date: Wed, 16 Mar 2022 18:31:33 +0100 Subject: [PATCH] feat(env variables): accessible project variabes --- components/Head.tsx | 6 +++--- pages/index.tsx | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/components/Head.tsx b/components/Head.tsx index 939f5dc..0ed6be0 100644 --- a/components/Head.tsx +++ b/components/Head.tsx @@ -2,15 +2,15 @@ import NextHead from "next/head"; const Head: React.FC = () => { const data = { - title: "Project", + title: process.env.NEXT_PUBLIC_PROJECT_NAME, + description: process.env.NEXT_PUBLIC_PROJECT_DESCRIPTION, image: "/images/icons/64x64.png", - description: "Your website description here.", url: "https://urlwebsite.fr/", }; return ( - Walid Korchi + {data.title} diff --git a/pages/index.tsx b/pages/index.tsx index 917fd95..f5466e6 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,7 +1,13 @@ import type { NextPage } from "next"; +import Head from "../components/Head"; + const Home: NextPage = () => { - return <>; + return ( + <> + + + ); }; export default Home;