Skip to content

Commit

Permalink
Revert "[FE] Deatil 페이지 및 OAuth 테스트용 뷰 추가 (#61)" (#62)
Browse files Browse the repository at this point in the history
This reverts commit 2baf578.
  • Loading branch information
jwu-ice committed Apr 29, 2022
1 parent 2baf578 commit 3bc6667
Show file tree
Hide file tree
Showing 42 changed files with 226 additions and 1,175 deletions.
1 change: 0 additions & 1 deletion BE/src/main/resources/application.properties

This file was deleted.

13 changes: 0 additions & 13 deletions BE/src/test/java/sidedish/com/ComApplicationTests.java

This file was deleted.

1 change: 0 additions & 1 deletion FE/.env

This file was deleted.

1 change: 0 additions & 1 deletion FE/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# misc
.DS_Store


.env

.env.local
Expand Down
67 changes: 35 additions & 32 deletions FE/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions FE/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<title>React App</title>
</head>
<body>
<div id="root"></div>
<div id="root-modal"></div>
</body>
</html>
41 changes: 34 additions & 7 deletions FE/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
import React from "react";
import Main from "pages/Main";
import Header from "components/Header";
import React, { useCallback, useEffect, useState } from "react";
import axios from "axios";
import BestMealContainer from "components/BestMealContainer";
import MealContainer from "components/MealContainer";
import { MOCK_SERVER_URL } from "constant";

const App = () => {
function App() {
const [meals, setMeals] = useState({
mealHeader: "",
mealCards: [],
});
const fetchCategoryMeal = useCallback(async () => {
try {
const { status, data } = await axios.get(`${MOCK_SERVER_URL}/api/products?meal=main`);
// TODO: status 코드 300번 구간도 포함해야하나 공부해보기
if (status >= 400) {
throw Error(`${status}: 데이터를 받아오는 도중 에러 발생`);
}
console.log(data);
setMeals({
mealHeader: "식탁을 풍성하게 하는 정갈한 밑반찬",
mealCards: data,
});
} catch (error) {
console.error(error);
}
}, []);

useEffect(() => {
fetchCategoryMeal();
}, []);
return (
<>
<Header />
<Main />
<BestMealContainer />
<MealContainer meals={meals} />
<div className="Modal"></div>
</>
);
};
}

export default App;
68 changes: 0 additions & 68 deletions FE/src/Pages/Main/index.jsx

This file was deleted.

25 changes: 0 additions & 25 deletions FE/src/Pages/Main/style.js

This file was deleted.

3 changes: 0 additions & 3 deletions FE/src/assets/angle-left.svg

This file was deleted.

3 changes: 0 additions & 3 deletions FE/src/assets/angle-right.svg

This file was deleted.

3 changes: 0 additions & 3 deletions FE/src/assets/cart.svg

This file was deleted.

3 changes: 0 additions & 3 deletions FE/src/assets/logo.svg

This file was deleted.

3 changes: 0 additions & 3 deletions FE/src/assets/man.svg

This file was deleted.

3 changes: 0 additions & 3 deletions FE/src/assets/search.svg

This file was deleted.

0 comments on commit 3bc6667

Please sign in to comment.