Skip to content

Commit

Permalink
Merge pull request #92 from LikeLion-Hackathon-T1/develop
Browse files Browse the repository at this point in the history
API 연결 완료
  • Loading branch information
seokkkkkk authored Aug 4, 2024
2 parents baf6ad9 + 19db109 commit 75a7fb2
Show file tree
Hide file tree
Showing 33 changed files with 435 additions and 401 deletions.
Binary file removed src/assets/images/address.png
Binary file not shown.
4 changes: 0 additions & 4 deletions src/assets/images/back1.svg

This file was deleted.

Binary file removed src/assets/images/empty_star.png
Binary file not shown.
Binary file removed src/assets/images/gimbap1.png
Binary file not shown.
Binary file removed src/assets/images/gimbap2.png
Binary file not shown.
Binary file removed src/assets/images/gimbap3.png
Binary file not shown.
Binary file removed src/assets/images/gimbap4.png
Binary file not shown.
Binary file removed src/assets/images/gimbap5.png
Binary file not shown.
Binary file removed src/assets/images/gimbap6.png
Binary file not shown.
Binary file removed src/assets/images/gimbap7.png
Binary file not shown.
6 changes: 0 additions & 6 deletions src/assets/images/marketbag1.svg

This file was deleted.

Binary file removed src/assets/images/menu_gimbap.png
Binary file not shown.
4 changes: 0 additions & 4 deletions src/assets/images/newhome1.svg

This file was deleted.

Binary file removed src/assets/images/no-visit.png
Binary file not shown.
Binary file removed src/assets/images/phonecall.png
Binary file not shown.
Binary file removed src/assets/images/star.png
Binary file not shown.
Binary file removed src/assets/images/time.png
Binary file not shown.
2 changes: 0 additions & 2 deletions src/components/Cart/Store.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ const Store = ({
}
};

console.log(items);

return (
<Container>
<StoreHeader
Expand Down
140 changes: 70 additions & 70 deletions src/components/Login/Welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,94 +7,94 @@ import { useCallback, useState } from "react";
import { useNavigate } from "react-router-dom";

const Welcome = () => {
const navigate = useNavigate();
const [isOwnerHovered, setIsOwnerHovered] = useState(false);
const [isCustomerHovered, setIsCustomerHovered] = useState(false);
const navigate = useNavigate();
const [isOwnerHovered, setIsOwnerHovered] = useState(false);
const [isCustomerHovered, setIsCustomerHovered] = useState(false);

const handleClick = useCallback(() => {
navigate("/");
}, [navigate]);
const handleClick = useCallback(() => {
navigate("/");
}, [navigate]);

return (
<Container>
<Title>
시장 방문객이신가요,
<br />
사장님이신가요?
</Title>
<UserContainer>
<Button
onClick={() => navigate("/owner/1")}
onMouseEnter={() => setIsOwnerHovered(true)}
onMouseLeave={() => setIsOwnerHovered(false)}
>
<ButtonTitle>소상공인</ButtonTitle>
{isOwnerHovered ? <OwnerClick /> : <Owner />}
</Button>
<Button
onClick={handleClick}
onMouseEnter={() => setIsCustomerHovered(true)}
onMouseLeave={() => setIsCustomerHovered(false)}
>
<ButtonTitle>손님</ButtonTitle>
{isCustomerHovered ? <CustomerClick /> : <Customer />}
</Button>
</UserContainer>
</Container>
);
return (
<Container>
<Title>
시장 방문객이신가요,
<br />
사장님이신가요?
</Title>
<UserContainer>
<Button
onClick={() => navigate("/owner/17")}
onMouseEnter={() => setIsOwnerHovered(true)}
onMouseLeave={() => setIsOwnerHovered(false)}
>
<ButtonTitle>소상공인</ButtonTitle>
{isOwnerHovered ? <OwnerClick /> : <Owner />}
</Button>
<Button
onClick={handleClick}
onMouseEnter={() => setIsCustomerHovered(true)}
onMouseLeave={() => setIsCustomerHovered(false)}
>
<ButtonTitle>손님</ButtonTitle>
{isCustomerHovered ? <CustomerClick /> : <Customer />}
</Button>
</UserContainer>
</Container>
);
};

const Container = styled.div`
display: flex;
flex-direction: column;
position: relative;
align-items: center;
justify-content: center;
height: 100dvh;
padding: 0 20px;
display: flex;
flex-direction: column;
position: relative;
align-items: center;
justify-content: center;
height: 100dvh;
padding: 0 20px;
`;

const Title = styled.span`
font-size: 24px;
color: ${({ theme }) => theme.color.gray900};
font-weight: ${({ theme }) => theme.fontWeight.bold};
line-height: 32px;
text-align: center;
position: absolute;
top: 20%;
font-size: 24px;
color: ${({ theme }) => theme.color.gray900};
font-weight: ${({ theme }) => theme.fontWeight.bold};
line-height: 32px;
text-align: center;
position: absolute;
top: 20%;
`;

const UserContainer = styled.div`
display: flex;
justify-content: space-around;
width: 100%;
display: flex;
justify-content: space-around;
width: 100%;
`;

const Button = styled.button`
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
cursor: pointer;
height: 154px;
width: 161px;
padding: 17px;
border-radius: 8px;
color: ${({ theme }) => theme.color.gray300};
border: 1px solid ${({ theme }) => theme.color.gray200};
background-color: ${({ theme }) => theme.color.gray50};
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
cursor: pointer;
height: 154px;
width: 161px;
padding: 17px;
border-radius: 8px;
color: ${({ theme }) => theme.color.gray300};
border: 1px solid ${({ theme }) => theme.color.gray200};
background-color: ${({ theme }) => theme.color.gray50};
&:hover {
box-shadow: 0px 4px 12px rgba(248, 63, 105, 0.08);
background-color: rgba(248, 63, 105, 0.04);
border: 1px solid ${({ theme }) => theme.color.primary};
color: ${({ theme }) => theme.color.gray900};
}
&:hover {
box-shadow: 0px 4px 12px rgba(248, 63, 105, 0.08);
background-color: rgba(248, 63, 105, 0.04);
border: 1px solid ${({ theme }) => theme.color.primary};
color: ${({ theme }) => theme.color.gray900};
}
`;

const ButtonTitle = styled.div`
font-size: 16px;
font-weight: ${({ theme }) => theme.fontWeight.semiBold};
font-size: 16px;
font-weight: ${({ theme }) => theme.fontWeight.semiBold};
`;

export default Welcome;
12 changes: 11 additions & 1 deletion src/components/Market/VisitItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ReactComponent as Gom2 } from "assets/images/foot_check2.svg";
import { useCallback, useEffect, useState } from "react";
import Button from "components/Common/Button";
import useSyluvAxios from "hooks/useSyluvAxios";
import { useNavigate } from "react-router-dom";

const VisitItem = ({
index,
Expand All @@ -18,6 +19,7 @@ const VisitItem = ({
const [status, setStatus] = useState(null);
const [style, setStyle] = useState(false);
const syluvAxios = useSyluvAxios();
const navigate = useNavigate();
const onCompleteClick = useCallback(() => {
handleOpenModal(null);
}, [handleOpenModal]);
Expand Down Expand Up @@ -71,7 +73,14 @@ const VisitItem = ({
</Container>

<Wrapper>
<div className="store">
<div
className="store"
onClick={() => {
navigate(`/market/1/${item.storeId}`, {
state: { item: item },
});
}}
>
<img src={item.imageUrl} alt="store" />
<div className="store-info">
<div>
Expand Down Expand Up @@ -253,6 +262,7 @@ const Wrapper = styled.div`
.store {
display: flex;
gap: 12px;
cursor: pointer;
}
.store-info {
Expand Down
2 changes: 0 additions & 2 deletions src/components/Order/Payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ const Payments = ({
pickUpRoute,
});

console.log(data);

useEffect(() => {
const totalAmount = data.reduce(
(total, item) => total + item.price * item.quantity,
Expand Down
Loading

0 comments on commit 75a7fb2

Please sign in to comment.