0
0
mirror of https://github.com/yude-jp/yude.jp synced 2024-12-22 20:20:09 +09:00
yude.jp/pages/components/Layout.js
2021-12-11 18:07:22 +09:00

35 lines
748 B
JavaScript

// Next.js
import Head from "next/head"
// Tailwind CSS
import "tailwindcss/tailwind.css";
// React
import React, { useEffect, useState } from 'react'
// Components
import Footer from "./Footer/Footer"
import Navbar from "./Navbar"
const Layout = (props) => {
const { title, children } = props
const siteTitle = "yude.jp"
return (
<div className="page">
<Head>
<title>{title ? `${title} - ${siteTitle}` : siteTitle}</title>
<link rel="icon" href="/images/favicon.ico" />
</Head>
<main>
<Navbar />
<div className="max-w-2xl mx-auto">
<div className="mx-2">
{children}
</div>
</div>
<Footer />
</main>
</div>
)
}
export default Layout