diff --git a/app/javascript/components/App.tsx b/app/javascript/components/App.tsx index 29322b7..a7ceebf 100644 --- a/app/javascript/components/App.tsx +++ b/app/javascript/components/App.tsx @@ -3,6 +3,7 @@ import { Routes, Route } from "react-router-dom"; import Layout from "./Layout"; import Home from "./Home"; +import Search from "./Search"; import RecipeTable from "./RecipeTable"; const App: React.FC = () => { @@ -10,7 +11,9 @@ const App: React.FC = () => { }> } /> + } /> } /> + } /> ); diff --git a/app/javascript/components/Layout.tsx b/app/javascript/components/Layout.tsx index 68f371f..66065b1 100644 --- a/app/javascript/components/Layout.tsx +++ b/app/javascript/components/Layout.tsx @@ -1,25 +1,41 @@ import React from 'react'; import { Outlet, Link } from "react-router-dom"; -function Layout(): React.ReactElement { +const Layout = (): JSX.Element => { return ( -
- +
+
+

ICON

+
-
- - +
+ +
) } +const Nav = (): JSX.Element => { + return ( + + ) +} + +const NavLink = ({ name, path }: {name: string, path: string}): JSX.Element => { + return ( +
  • + {name} +
  • + ) +} + export default Layout; diff --git a/app/javascript/components/Search.tsx b/app/javascript/components/Search.tsx new file mode 100644 index 0000000..fc33854 --- /dev/null +++ b/app/javascript/components/Search.tsx @@ -0,0 +1,12 @@ +import React from 'react'; + +function Home(): React.ReactElement { + return ( +
    + + +
    + ); +} + +export default Home; diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 630141d..43da5ef 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -21,7 +21,7 @@ <%= javascript_include_tag "application", type: "module" %> - + <%= yield %>