From 49f6b3790572b3e0a3ab201d88378c8acf195181 Mon Sep 17 00:00:00 2001 From: zadit <75159257+insvrgent@users.noreply.github.com> Date: Mon, 10 Feb 2025 08:22:02 +0700 Subject: [PATCH] ok --- src/components/Header.js | 2 +- src/components/Item.js | 9 +-- src/components/Item.module.css | 10 ++-- src/components/ItemLister.js | 82 +++++++++++++++------------- src/components/ItemLister.module.css | 4 +- src/pages/NotificationRequest.js | 6 +- 6 files changed, 57 insertions(+), 56 deletions(-) diff --git a/src/components/Header.js b/src/components/Header.js index 2ba31c0..f24a37b 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -219,7 +219,7 @@ const Child = styled.div` const Header = ({ HeaderText, - HeaderSize = '6vw', + HeaderSize = '5vw', shopId, shopName, shopImage, diff --git a/src/components/Item.js b/src/components/Item.js index 41a004e..88d832e 100644 --- a/src/components/Item.js +++ b/src/components/Item.js @@ -25,13 +25,6 @@ const Item = ({ const [itemPrice, setItemPrice] = useState(initialPrice); const fileInputRef = useRef(null); - useEffect(() => { - if(!isBeingEdit) { - setPreviewUrl(imageUrl) - fileInputRef.current.value = null; // Clear the input value - } - }, [isBeingEdit]); - useEffect(() => { console.log(imageUrl); console.log(selectedImage); @@ -120,7 +113,7 @@ const Item = ({ {(isBeingEdit || blank) && (
- {previewUrl ? "Ganti" : "Ganti"} + {previewUrl ? "Click To Change Image" : "Click To Add Image"}
)} diff --git a/src/components/Item.module.css b/src/components/Item.module.css index a127ed7..f3b86c1 100644 --- a/src/components/Item.module.css +++ b/src/components/Item.module.css @@ -55,11 +55,11 @@ .overlay { position: absolute; - top: 30px; - left: 10px; - right: 10px; - bottom: 30px; - background-color: rgba(0, 0, 0, 0.2); + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); color: white; display: flex; justify-content: center; diff --git a/src/components/ItemLister.js b/src/components/ItemLister.js index eb7abec..7c0e4fc 100644 --- a/src/components/ItemLister.js +++ b/src/components/ItemLister.js @@ -756,8 +756,8 @@ const ItemLister = ({ )} {(isEdit && !isFirstStep || !isEdit) && <> - {isEdit &&
setIsFirstStep(true)}>
-

{items && items.length < 1 ? 'Buat item' :'Daftar item'}

} + {isEdit &&
setIsFirstStep(true)}>
+

{items && items.length < 1 ? 'Buat item' : 'Daftar item'}

}
{user && ( user.userId == shopOwnerId || user.cafeId == shopId) && @@ -885,43 +885,49 @@ const ItemLister = ({
{isEditMode && isEditItem != item.itemId && (
- {isEditMode && ( - handleChange(item.itemId)} - checked={item.availability} - /> - )} -

-  {item.availability ? "tersedia" : "tidak tersedia"}  -

-
editItem(item.itemId)} - > - + {isEditMode && ( + handleChange(item.itemId)} + checked={item.availability} + /> + )} +

+  {item.availability ? "tersedia" : "tidak tersedia"} +

+
+ +
+
editItem(item.itemId)} > - - - - - - - + + + + + + + + +
+

Edit item

)} diff --git a/src/components/ItemLister.module.css b/src/components/ItemLister.module.css index 020330b..a08f50c 100644 --- a/src/components/ItemLister.module.css +++ b/src/components/ItemLister.module.css @@ -143,9 +143,11 @@ width: 100%; top: 7px; bottom: -4px; - display: flex; + display: flex +; align-items: center; justify-content: center; + flex-direction: column; } .PaymentOption { diff --git a/src/pages/NotificationRequest.js b/src/pages/NotificationRequest.js index 81257c9..2f617a0 100644 --- a/src/pages/NotificationRequest.js +++ b/src/pages/NotificationRequest.js @@ -26,13 +26,13 @@ export default function Transaction_pending({ setModal }) { return (
-
+
- Success + /> */}

Notifikasi tidak aktif

Aktifkan notifikasi supaya kamu tetap dapat info pesanan, meski sedang buka aplikasi lain.