refactor layout

This commit is contained in:
Ruidy 2021-03-28 13:48:09 +02:00
parent 8fb5ca872c
commit 41758bbdf2
2 changed files with 13 additions and 10 deletions

View file

@ -1,9 +1,10 @@
import React, { useState } from "react";
import { Footer } from "../components/Footer";
import { Navbar } from "../components/Navbar";
import { SearchBar } from "../components/SearchBar";
import { Footer } from "../components/Footer";
import { SideNav } from "../components/SideNav";
// TODO FC...
const MainLayout = ({
buttonUrl,
getRandomMeal,
@ -62,7 +63,7 @@ const MainLayout = ({
closeNavClick={closeNavClick}
links={links}
buttonUrl={buttonUrl}
handleClick={()=>{}}
handleClick={() => {}}
/>
</header>
{children}

View file

@ -1,12 +1,14 @@
import React from "react";
import { FC } from "react";
const PageLayout = ({ title, children }) => {
return (
<div className="container">
<h1 className="logo">{title}</h1>
{children}
</div>
);
type Props = {
title: string;
};
const PageLayout: FC<Props> = ({ title, children }) => (
<div className="container">
<h1 className="logo">{title}</h1>
{children}
</div>
);
export default PageLayout;