diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 24cbfb4..ef3e106 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,7 @@ --- name: Feature Template about: Suggest an idea for this project -title: '[FEAT]' +title: '' labels: '' assignees: '' --- diff --git a/package.json b/package.json index 0de355a..2788b34 100644 --- a/package.json +++ b/package.json @@ -15,10 +15,14 @@ "react": "^17.0.2", "react-dom": "^17.0.2", "react-helmet-async": "^1.2.3", + "react-icons": "^4.3.1", + "react-loading-icons": "^1.0.8", "react-scripts": "5.0.0", "styled-components": "^5.3.3", + "styled-normalize": "^8.0.7", "typescript": "^4.6.2", - "web-vitals": "^2.1.4" + "web-vitals": "^2.1.4", + "yup": "^0.32.11" }, "scripts": { "start": "react-scripts start", @@ -81,6 +85,7 @@ "eslint-plugin-react-hooks": "^4.3.0", "firebase-tools": "^10.2.2", "prettier": "^2.5.1", + "react-router-dom": "^6.2.2", "webpack": "^5.70.0" } } diff --git a/src/components/App/App.tsx b/src/components/App/App.tsx index 3f11b95..40e7ec1 100644 --- a/src/components/App/App.tsx +++ b/src/components/App/App.tsx @@ -1,19 +1,35 @@ -import logo from 'assets/logo.svg'; import './App.css'; +import { useLocation, Routes, Route, Navigate } from 'react-router-dom'; +import Layout from 'pages/Layout/Layout'; +import Home from 'pages/Home/Home'; +import Search from 'pages/Search/Search'; +import MyRecipes from 'pages/MyRecipes/MyRecipes'; +import Modal from 'pages/Modal/Modal'; +import PageNotFound from 'pages/PageNotFound/PageNotFound'; function App() { + const location = useLocation(); + const state = location.state as { backgroundLocation?: Location }; + const backgroundLocation = state?.backgroundLocation; + return ( -
-
- logo -

- Edit src/App.tsx and save to reload. -

- - Learn React - -
-
+ <> + + }> + } /> + } /> + } /> + } /> + } /> + } /> + + + {backgroundLocation && ( + + } /> + + )} + ); } diff --git a/src/components/Label/Label.stories.tsx b/src/components/Label/Label.stories.tsx new file mode 100644 index 0000000..b783ae1 --- /dev/null +++ b/src/components/Label/Label.stories.tsx @@ -0,0 +1,34 @@ +import { ComponentMeta, ComponentStory } from '@storybook/react'; +import Label from './Label'; + +export default { + title: 'Label', + component: Label, + args: { + type: 'time', + value: 0, + }, +} as ComponentMeta; +const Template: ComponentStory = (args) =>