Skip to content

Commit

Permalink
Merge pull request #321 from imi21123/test
Browse files Browse the repository at this point in the history
Feat: 축제 부스 리스트 관련 기능 삭제
  • Loading branch information
imi21123 authored May 26, 2024
2 parents d216991 + edd0436 commit 0f1d7ed
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 78 deletions.
6 changes: 0 additions & 6 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import PaymentPage from "./pages/PaymentPage/PaymentPage";
import PaymentFailPage from "./pages/PaymentPage/Redirect/PaymentFailPage";
import PaymentLoadingPage from "./pages/PaymentPage/Redirect/PaymentLoadingPage";
import Splash from "./pages/Splash/Splash";
import FestivalBoothSearch from "./pages/StoreSearch/FestivalBoothSearch";
import StoreSearchPage from "./pages/StoreSearch/StoreSearch";
function App() {
// const [cookies, , removeCookies] = useCookies();
Expand All @@ -57,10 +56,8 @@ function App() {
const NewPaymentPage = Auth(PaymentPage, true, 2);
const NewPaymentLoadingPage = Auth(PaymentLoadingPage, true, 2);
const NewPaymentFailPage = Auth(PaymentFailPage, true, 2);
const NewFestivalBoothSearch = Auth(FestivalBoothSearch, true, 2);
// const NewPackagingStatusPage = Auth(PackagingStatusPage, true);


return (
<div className="App">
<RecoilRoot>
Expand Down Expand Up @@ -121,9 +118,6 @@ function App() {
/>
{/* 결제 실패 리다이렉트 페이지 */}
<Route path="/payment/fail" element={<NewPaymentFailPage />} />

{/* 축제 부스 검색 페이지 */}
<Route path="/booth" element={<NewFestivalBoothSearch />} />
</Routes>
</Suspense>
</RecoilRoot>
Expand Down
16 changes: 2 additions & 14 deletions src/components/views/StoreList/StoreList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,11 @@ import { IMAGES } from "../../../constants/images";
import useFetchSearch from "../../../hooks/useFetchSearch";
import "./StoreList.css";

const StoreList = ({ searchTerm = "", cafe = false, booth = false }) => {
const StoreList = ({ searchTerm = "" }) => {
const navigate = useNavigate();
const stores = useFetchSearch();
let displayStores = [];

if (cafe && booth) {
displayStores = stores;
} else if (cafe) {
displayStores = stores.filter((item) => item.idx < 10);
} else if (booth) {
displayStores = stores.filter((item) => item.idx >= 10);
}

// 검색어에 따라 필터링된 목록을 반환하는 로직
const filteredStores = stores.filter((item) => {
return item.name.toLowerCase().includes(searchTerm.toLowerCase());
Expand All @@ -32,11 +24,7 @@ const StoreList = ({ searchTerm = "", cafe = false, booth = false }) => {
key={item.idx}
className="store_list_item"
onClick={() => {
if (item.idx >= 10) {
navigate(`/store?storeId=${item.idx}&inout=2`);
} else {
navigate(`/packagingStatus?storeId=${item.idx}`);
}
navigate(`/packagingStatus?storeId=${item.idx}`);
}}
>
<img
Expand Down
2 changes: 1 addition & 1 deletion src/pages/HomePage/Homepage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const HomePage = () => {
<Banner />

<div className="home_berry_pick">베리 PICK</div>
<StoreList cafe={true} />
<StoreList />

<div className="home_business_info">
<div className="home_business_info_name">ReadyVery</div>
Expand Down
56 changes: 0 additions & 56 deletions src/pages/StoreSearch/FestivalBoothSearch.jsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/StoreSearch/StoreSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function StoreSearch() {
</form>

{/* Debounced search term을 사용하여 StoreList에 prop으로 전달 */}
<StoreList searchTerm={debouncedSearchTerm} cafe={true} booth={true} />
<StoreList searchTerm={debouncedSearchTerm} />

<NavBar />
</div>
Expand Down

0 comments on commit 0f1d7ed

Please sign in to comment.