Skip to content

Commit

Permalink
Merge pull request #307 from KKangHHee/test
Browse files Browse the repository at this point in the history
Feat: 축제용 페이지 뒤로가기 경로 수정
  • Loading branch information
imi21123 authored May 12, 2024
2 parents f3fb48e + 26cfa6d commit 643f7f7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Binary file added public/images/test2/test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/test3/test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/components/views/StoreList/StoreList.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react";
import "./StoreList.css";
import { IMAGES } from "../../../constants/images";
import { useNavigate } from "react-router-dom";
import { IMAGES } from "../../../constants/images";
import useFetchSearch from "../../../hooks/useFetchSearch";
import "./StoreList.css";

const StoreList = ({ searchTerm = "", cafe = false, booth = false }) => {
const navigate = useNavigate();
Expand Down Expand Up @@ -33,7 +33,7 @@ const StoreList = ({ searchTerm = "", cafe = false, booth = false }) => {
className="store_list_item"
onClick={() => {
if (item.idx >= 10) {
navigate(`/store?storeId=${item.idx}&inout=2`);
navigate(`/store?storeId=${item.idx}&inout=2/booth`);
} else {
navigate(`/packagingStatus?storeId=${item.idx}`);
}
Expand Down
14 changes: 9 additions & 5 deletions src/pages/StoreDetailPage/StoreDetailPage.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useEffect, useState } from "react";
import { useLocation, useNavigate } from "react-router-dom";
import Header from "../../components/views/Header/Header";
import "./StoreDetailPage.css";
import useFetchCartCount from "../../hooks/useFetchCartCount";
import useFetchCartData from "../../hooks/useFetchCartData";
import useFetchStoreInfo from "../../hooks/useFetchStoreInfo";
import useFetchStoreMenu from "../../hooks/useFetchStoreMenu";
import useFetchCartData from "../../hooks/useFetchCartData";
import useFetchCartCount from "../../hooks/useFetchCartCount";
import "./StoreDetailPage.css";

const StoreDetailPage = () => {
const navigate = useNavigate();
Expand All @@ -23,7 +23,11 @@ const StoreDetailPage = () => {
const handleCategoryClick = (category) => {
setSelectedCategory(category);
};

// 축제용
const boothLinkTo = location.search.includes("/booth")
? "/booth"
: `/packagingStatus?storeId=${storeIdParam}`;

useEffect(() => {
if (menu && menu.menu && menu.menu.length > 0) {
setSelectedCategory(menu.menu[0]);
Expand All @@ -35,7 +39,7 @@ const StoreDetailPage = () => {
<Header
headerProps={{
pageName: "",
linkTo: `/packagingStatus?storeId=${storeIdParam}`,
linkTo: boothLinkTo,
}}
/>

Expand Down

0 comments on commit 643f7f7

Please sign in to comment.