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 React, { useState } from "react";
|
||||||
|
import { Footer } from "../components/Footer";
|
||||||
import { Navbar } from "../components/Navbar";
|
import { Navbar } from "../components/Navbar";
|
||||||
import { SearchBar } from "../components/SearchBar";
|
import { SearchBar } from "../components/SearchBar";
|
||||||
import { Footer } from "../components/Footer";
|
|
||||||
import { SideNav } from "../components/SideNav";
|
import { SideNav } from "../components/SideNav";
|
||||||
|
|
||||||
|
// TODO FC...
|
||||||
const MainLayout = ({
|
const MainLayout = ({
|
||||||
buttonUrl,
|
buttonUrl,
|
||||||
getRandomMeal,
|
getRandomMeal,
|
||||||
|
|
@ -62,7 +63,7 @@ const MainLayout = ({
|
||||||
closeNavClick={closeNavClick}
|
closeNavClick={closeNavClick}
|
||||||
links={links}
|
links={links}
|
||||||
buttonUrl={buttonUrl}
|
buttonUrl={buttonUrl}
|
||||||
handleClick={()=>{}}
|
handleClick={() => {}}
|
||||||
/>
|
/>
|
||||||
</header>
|
</header>
|
||||||
{children}
|
{children}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,14 @@
|
||||||
import React from "react";
|
import { FC } from "react";
|
||||||
|
|
||||||
const PageLayout = ({ title, children }) => {
|
type Props = {
|
||||||
return (
|
title: string;
|
||||||
<div className="container">
|
|
||||||
<h1 className="logo">{title}</h1>
|
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const PageLayout: FC<Props> = ({ title, children }) => (
|
||||||
|
<div className="container">
|
||||||
|
<h1 className="logo">{title}</h1>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
export default PageLayout;
|
export default PageLayout;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue