Skip to content

Commit

Permalink
Merge pull request #18 from EXPITC/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
EXPITC authored Jun 22, 2023
2 parents 2853357 + 1126e1d commit 8cf1f70
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 149 deletions.
12 changes: 9 additions & 3 deletions src/components/CartPage/CartPage.styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export const FlexCollum = styled.div`
display: flex;
flex-direction: column;
width: 30%;
tb {
tbody {
display: flex;
flex-direction: column;
justify-content: space-evenly;
Expand All @@ -194,11 +194,17 @@ export const FlexCollum = styled.div`
border-top: 2px solid black;
border-collapse: collapse;
}
tr > td {
/* border: 1px solid black; */
display: flex;
/* flex-direction: column; */
justify-content: space-evenly;
}
`;
export const Pp = styled.p`
@import url("https://fonts.googleapis.com/css2?family=Abhaya+Libre:wght@800&family=Montserrat:ital,wght@1,100&family=Shippori+Antique+B1&display=swap");
// @import url("https://fonts.googleapis.com/css2?family=Abhaya+Libre:wght@800&family=Montserrat:ital,wght@1,100&family=Shippori+Antique+B1&display=swap");
font-family: "Montserrat", sans-serif;
color: ${(props) => (props.r ? "red !important" : "black !important")};
color: ${(props) => (props.r ? "red !important;" : "black !important;")};
font-size: 14px;
font-weight: ${(props) => (props.b ? "bold" : null)};
`;
Expand Down
172 changes: 97 additions & 75 deletions src/components/CartPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,16 @@ const CartPage = () => {
return (
<>
{open && (
<Map toggle={openMap} setLocEdit={setLoc} updateLoc={updateloc} cart />
)}
{far && (
<Map
toggle={openMap}
setLocEdit={setLoc}
updateLoc={updateloc}
open
cart
toggle={handleConfirm}
startLoc={start}
far
transId={transaction?.id}
/>
)}
{far && <Map toggle={handleConfirm} startLoc={start} far />}
<Header trigger={transaction} />
{isLoading ? (
<Center>
Expand All @@ -314,82 +315,103 @@ const CartPage = () => {
<WrapOrder>
<div className="over">
<WrapOrder2>
{/* TC~REPEAT */}

{orders.map((order, index) => {
return (
<Flex key={order.id + index}>
<Wrap1>
<img src={order.img} alt="product" />
<Wrap2>
<Wrap3>
<h4>{order.title}</h4>
<p>
{convertRupiah.convert(
order.order.qty * order.price
)}
</p>
</Wrap3>
<Wrap3>
<div>
{!transactionIdle && (
<button
onClick={() => {
lessHandle(order.id);
}}
>
<img src={min} alt="min" />
</button>
)}
<tbody>
{/* TC~REPEAT */}
{orders.map((order, index) => {
return (
<tr key={order.id + index}>
<Flex>
<Wrap1>
<img src={order.img} alt="product" />
<Wrap2>
<Wrap3>
<h4>{order.title}</h4>
<p>
{convertRupiah.convert(
order.order.qty * order.price
)}
</p>
</Wrap3>
<Wrap3>
<div>
{!transactionIdle && (
<button
onClick={() => {
lessHandle(order.id);
}}
>
<img src={min} alt="min" />
</button>
)}

<h4 className="pinkBg">{order.order.qty}</h4>
{!transactionIdle && (
<button
onClick={() => {
addHandle(order.id);
}}
>
<img src={plus} alt="plus" />
</button>
)}
</div>
{!transactionIdle && (
<button
onClick={() => {
orderDelete(order.order.id);
}}
>
<img src={trash} alt="trash" />
</button>
)}
</Wrap3>
</Wrap2>
</Wrap1>
</Flex>
);
})}
<h4 className="pinkBg">{order.order.qty}</h4>
{!transactionIdle && (
<button
onClick={() => {
addHandle(order.id);
}}
>
<img src={plus} alt="plus" />
</button>
)}
</div>
{!transactionIdle && (
<button
onClick={() => {
orderDelete(order.order.id);
}}
>
<img src={trash} alt="trash" />
</button>
)}
</Wrap3>
</Wrap2>
</Wrap1>
</Flex>
</tr>
);
})}
</tbody>
</WrapOrder2>
</div>
<FlexCollum>
<tb>
<Wrap3>
<Pp>Subtotal</Pp>
<Pp r>{convertRupiah.convert(transaction?.price)}</Pp>
</Wrap3>
<Wrap3>
<Pp>Qty</Pp>
<Pp>{total}</Pp>
</Wrap3>
<Wrap3>
<Pp>Ongkir</Pp>
<Pp r={true}>Rp.10.000</Pp>
</Wrap3>
</tb>
<table>
<tbody>
<tr>
<td>
<Wrap3>
<Pp>Subtotal</Pp>
<Pp r={"true"}>
{convertRupiah.convert(transaction?.price)}
</Pp>
</Wrap3>
</td>
</tr>
<tr>
<td>
<Wrap3>
<Pp>Qty</Pp>
<Pp>{total}</Pp>
</Wrap3>
</td>
</tr>
<tr>
<td>
<Wrap3>
<Pp>Ongkir</Pp>
<Pp r={"true"}>Rp.10.000</Pp>
</Wrap3>
</td>
</tr>
</tbody>
</table>
<Wrap1>
<Pp r={true} b={true}>
<Pp r={"true"} b={"true"}>
TOTAL
</Pp>
<Pp r>{convertRupiah.convert(transaction?.price + 10000)}</Pp>
<Pp r={"true"}>
{convertRupiah.convert(transaction?.price + 10000)}
</Pp>
</Wrap1>
</FlexCollum>
</WrapOrder>
Expand Down
42 changes: 0 additions & 42 deletions src/components/LandingPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,48 +34,6 @@ import convertRupiah from "rupiah-format";
import AuthButtons from "../AuthButtons";
import { AuthModalContext } from "../../Context/authModalContext";

// TC~Dummy
// const resto = [
// {
// name: "Burger King",
// img: "https://pngimg.com/uploads/burger_king/burger_king_PNG17.png",
// },
// {
// name: "Startbucks",
// img: "https://www.freepnglogos.com/uploads/starbucks-logo-png-25.png",
// },
// {
// name: "KFC",
// img: "https://www.freepnglogos.com/uploads/kfc-png-logo/camera-kfc-png-logo-0.png",
// },
// {
// name: "Jco",
// img: "https://1.bp.blogspot.com/-QaywjoHhvXM/Xt9fsQbVeuI/AAAAAAAAGXQ/ut_W8VQkhiQFODR9C_zr0zAYLf8UhlMvgCK4BGAsYHg/s1200/jco.png",
// },
// ];
// const near = [
// {
// food: "Geprek Bensu",
// img: "https://upload.wikimedia.org/wikipedia/commons/2/24/Ayam_geprek.png",
// distance: "0,2 KM",
// },
// {
// food: "Nasi Goreng Mas Roni",
// img: "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Nasi_Goreng.jpg/800px-Nasi_Goreng.jpg",
// distance: "0,6 KM",
// },
// {
// food: "Pecel Ayam Prambanan",
// img: "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/Pecel_Solo.JPG/800px-Pecel_Solo.JPG",
// distance: "0,6 KM",
// },
// {
// food: "Kopi Kenangan",
// img: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/45/A_small_cup_of_coffee.JPG/800px-A_small_cup_of_coffee.JPG",
// distance: "1,6 KM",
// },
// ];

const LandingPage = () => {
const { state } = useContext(UserContext);
const { dispatch } = useContext(AuthModalContext);
Expand Down
47 changes: 28 additions & 19 deletions src/components/Map/Map.styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,23 @@ export const Wrapper = styled.div`
`;
export const Card = styled.div`
width: 419px;
height: ${(props) => (props.h ? "295px" : "185px")};
/* height: ${(props) => (props.h ? "auto" : "185px")}; */
height: auto;
z-index: 999;
background: #ffffff;
box-shadow: 0px -12px 11px -6px rgba(0, 0, 0, 0.25);
border-radius: 5px 5px 3px 3px;
/* position: absolute; */
position: absolute;
display: flex;
flex-direction: column;
gap: 18px;
padding-top: 10px;
padding-bottom: 10px;
opacity: 0;
${(props) =>
props.h
? `top : 93px; right: 23px;`
: ` bottom:30px;
left:35%;`}
props.h ? "top : 93px; right: 23px;" : "bottom:30px; left:35%;"}
animation: appear 2s ease-out forwards;
animation-delay: ${(props) => (props.h ? "1s" : null)};
animation-delay: ${(props) => (props.h ? "1s" : "0")};
@keyframes appear {
from {
opacity: 0;
Expand All @@ -78,36 +80,43 @@ export const Card = styled.div`
padding-left: 10px;
h3 {
font-family: "Montserrat", sans-serif;
${(props) => (props.h ? `margin-top : 43px; margin-bottom:17px` : null)}
/* ${(props) => (props.h ? "margin-top: 43px; margin-bottom:17px;" : "")} */
margin: 0;
}
p {
font-family: "Montserrat", sans-serif;
font-size: 12px;
margin: 0;
margin-top: 3px;
/* margin-top: 3px; */
width: 100%;
}
h5 {
font-size: 13px;
margin: 0;
}
img {
position: relative;
width: 55px;
height: 55px;
}
.address {
/* border: 1px solid black; */
display: flex;
justify-content: space-evenly;
align-items: center;
height: 55px;
img {
position: relative;
width: 55px;
height: 55px;
/* border: 1px solid red; */
}
div {
width: 100%;
/* border: 1px solid black; */
margin-left: 24px;
width: 80%;
> h3 {
text-align: center;
}
}
}
button {
margin-top: 25px;
/* margin-top: 25px; */
width: 395px;
height: 30px;
font-family: "Montserrat", sans-serif;
Expand Down
Loading

1 comment on commit 8cf1f70

@vercel
Copy link

@vercel vercel bot commented on 8cf1f70 Jun 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

foodways – ./

foodways-git-main-expitc.vercel.app
foodways-expitc.vercel.app
foodways.vercel.app

Please sign in to comment.