Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: HomePage-PackagingStatusPage-StoreDetailPage 연결 #27

Closed
wants to merge 2 commits into from
Closed
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
6 changes: 5 additions & 1 deletion src/pages/HomePage/Homepage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import "./Homepage.css";

function Homepage() {
const [isLoggedIn, setIsLoggedIn] = useState(false);

// const [quickOrderItems, setQuickOrderItems] = useState([
// { id: 1, name: "커피파로스" },
// { id: 2, name: "오르다" },
Expand Down Expand Up @@ -160,7 +161,10 @@ function Homepage() {
<div className="very-pick-list">
<div className="very-pick-items">
{dummyVeryPickItems.map((item) => (
<Link to="/storeDetail" className="very-pick-item">
<Link
to={`/packagingStatus?storeId=${item.id}`}
className="very-pick-item"
>
<React.Fragment>
<div className="pick-name">{item.name}</div>
<div className="pick-address">{item.address}</div>
Expand Down
42 changes: 26 additions & 16 deletions src/pages/PackagingStatusPage/PackagingStatusPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ import takeOut from "../../assets/images/take_out.svg";
import takeIn from "../../assets/images/take_in.svg";
import promotion from "../../assets/images/promotion.svg";
import "./style.css";
import { Link, useLocation } from "react-router-dom";

const PackagingStatusPage = () => {
const takeoutStatus = "";
const location = useLocation();
const params = new URLSearchParams(location.search);
const storeId = params.get("storeId");

return (
<div className="packaging-status-page">
<Header />
Expand All @@ -20,23 +26,27 @@ const PackagingStatusPage = () => {
alt="promotion"
/>

<div className="packaging-status-page__btn">
<img
className="packaging-status-page__btn__img"
src={takeOut}
alt="takeOut"
/>
<text className="packaging-status-page__text">가져갈게요</text>
</div>
<Link to={`/storeDetail?storeId=${storeId}&inout=2`}>
<div className="packaging-status-page__btn">
<img
className="packaging-status-page__btn__img"
src={takeOut}
alt="takeOut"
/>
<span className="packaging-status-page__text">가져갈게요</span>
</div>
</Link>

<div className="packaging-status-page__btn">
<img
className="packaging-status-page__btn__img"
src={takeIn}
alt="takeOut"
/>
<text className="packaging-status-page__text">먹고갈게요</text>
</div>
<Link to={`/storeDetail?storeId=${storeId}&inout=1`}>
<div className="packaging-status-page__btn">
<img
className="packaging-status-page__btn__img"
src={takeIn}
alt="takeOut"
/>
<span className="packaging-status-page__text">먹고갈게요</span>
</div>
</Link>
</div>
);
};
Expand Down
6 changes: 3 additions & 3 deletions src/pages/PackagingStatusPage/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@

.packaging-status-page__btn {
display: flex;
width: 100%;
width: 21.5625rem;
height: 3.0625rem;
flex-shrink: 0;
border-radius: 0.1875rem;
border: 1px solid #dadada;
background: #fff;
flex-direction: row;
margin-left: 1.5rem;
margin-right: 1.5rem;
margin-left: auto;
margin-right: auto;
margin-bottom: 0.44rem;
}

Expand Down
Loading