mirror of
https://github.com/rjNemo/meal_planner
synced 2026-06-12 13:26:45 +00:00
refactor layout
This commit is contained in:
parent
8fb5ca872c
commit
41758bbdf2
2 changed files with 13 additions and 10 deletions
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue