Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Feature Template
about: Suggest an idea for this project
title: ''
title: '[FEAT]'
labels: ''
assignees: ''
---
Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@
"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",
"yup": "^0.32.11"
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
Expand Down Expand Up @@ -85,7 +81,6 @@
"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"
}
}
40 changes: 12 additions & 28 deletions src/components/App/App.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,19 @@
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 (
<>
<Routes location={backgroundLocation || location}>
<Route path="/" element={<Layout />}>
<Route index element={<Home />} />
<Route path="search/:keyword" element={<Search />} />
<Route path="my-recipes" element={<MyRecipes />} />
<Route path="/detail/:id" element={<Modal />} />
<Route path="page-not-found" element={<PageNotFound />} />
<Route path="*" element={<Navigate to="page-not-found" replace />} />
</Route>
</Routes>
{backgroundLocation && (
<Routes>
<Route path="/detail/:id" element={<Modal />} />
</Routes>
)}
</>
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<a className="App-link" href="https://reactjs.org" target="_blank" rel="noopener noreferrer">
Learn React
</a>
</header>
</div>
);
}

Expand Down
34 changes: 0 additions & 34 deletions src/components/Label/Label.stories.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions src/components/Label/Label.styled.tsx

This file was deleted.

34 changes: 0 additions & 34 deletions src/components/Label/Label.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/components/Label/Label.types.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export { default as App } from './App/App';
export { default as Label } from './Label/Label';
12 changes: 2 additions & 10 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
import { StrictMode } from 'react';
import { render } from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import { ThemeProvider } from 'styled-components';
import { GlobalStyle } from 'styles/GlobalStyle';
import { defaultTheme } from 'theme/theme';
import { App } from './components';
// import './reportWebVitals';
import './styles/global.css';

render(
<StrictMode>
<ThemeProvider theme={defaultTheme}>
<GlobalStyle />
<BrowserRouter>
<App />
</BrowserRouter>
</ThemeProvider>
<App />
</StrictMode>,
document.getElementById('root'),
);
3 changes: 0 additions & 3 deletions src/pages/Home/Home.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions src/pages/Layout/Layout.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/Modal/Modal.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/MyRecipes/MyRecipes.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/PageNotFound/PageNotFound.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/Search/Search.tsx

This file was deleted.

125 changes: 0 additions & 125 deletions src/styles/GlobalStyle.ts

This file was deleted.

Binary file removed src/styles/fonts/Montserrat-Bold.woff2
Binary file not shown.
Binary file removed src/styles/fonts/Montserrat-Regular.woff2
Binary file not shown.
11 changes: 11 additions & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
'Droid Sans', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}
Loading