diff --git a/public/Cart/empty_card.gif b/public/Cart/empty_card.gif new file mode 100644 index 0000000..55ba611 Binary files /dev/null and b/public/Cart/empty_card.gif differ diff --git a/public/Home/notfound_search.png b/public/Home/notfound_search.png new file mode 100644 index 0000000..dfc2f4c Binary files /dev/null and b/public/Home/notfound_search.png differ diff --git a/public/icon/notfound_search.png b/public/icon/notfound_search.png new file mode 100644 index 0000000..dfc2f4c Binary files /dev/null and b/public/icon/notfound_search.png differ diff --git a/src/App.tsx b/src/App.tsx index 999b8b4..b1a15b7 100755 --- a/src/App.tsx +++ b/src/App.tsx @@ -19,12 +19,12 @@ const App = () => { } }, [data]); - + const randomtoken = Math.random() useEffect(() => { const fn_firebase = (async () => { - const token = await requestPermission() + // const token = await requestPermission() if (!Guest) { - mutate({ fcm_token: token }); + mutate({ fcm_token: randomtoken }); } }) fn_firebase() diff --git a/src/Components/HOC/CartWithDrawer.tsx b/src/Components/HOC/CartWithDrawer.tsx index af510ea..1676092 100644 --- a/src/Components/HOC/CartWithDrawer.tsx +++ b/src/Components/HOC/CartWithDrawer.tsx @@ -61,7 +61,7 @@ const CartWithDrawer = () => { open={open} key={placement} width={550} - style={{maxHeight:"90%"}} + style={{maxHeight:"60%", minHeight:"500px"}} >
{t("Cart")} @@ -76,6 +76,7 @@ const CartWithDrawer = () => { ))}
+ {Cart?.length > 0 ? (
@@ -97,7 +98,10 @@ const CartWithDrawer = () => {
) : ( -
+
+ +

{t('You have not placed any orders yet')}

+
)} diff --git a/src/Components/Utils/Search/Empty.tsx b/src/Components/Utils/Search/Empty.tsx new file mode 100644 index 0000000..93956d2 --- /dev/null +++ b/src/Components/Utils/Search/Empty.tsx @@ -0,0 +1,17 @@ +import React from 'react' +import { useTranslation } from 'react-i18next' + +const Empty = () => { + const [t] = useTranslation() + return ( +
+ +

{t("There are no suitable products")}

+

+ {t("Please try using other keywords to find the product name")} +

+
+ ) +} + +export default Empty \ No newline at end of file diff --git a/src/Components/Utils/SearchBar/SearchBar.scss b/src/Components/Utils/SearchBar/SearchBar.scss index 337fab6..d9fc6c8 100755 --- a/src/Components/Utils/SearchBar/SearchBar.scss +++ b/src/Components/Utils/SearchBar/SearchBar.scss @@ -104,4 +104,9 @@ border-radius: 5px 0 0 5px; } + } + + .search_comp{ + display: flex; + flex-direction: column; } \ No newline at end of file diff --git a/src/Pages/Auth/LoginForm.tsx b/src/Pages/Auth/LoginForm.tsx index 388cfa7..3c1671c 100755 --- a/src/Pages/Auth/LoginForm.tsx +++ b/src/Pages/Auth/LoginForm.tsx @@ -18,6 +18,7 @@ const LoginForm = ({ setOpen }: any) => { const { mutate, isLoading, isSuccess, data } = useLogin(); const { login } = useAuthState(); const FCM = localStorage.getItem(FCM_TOKEN_KEY) + const random_token = Math.random() const handelSubmit = (values: any) => { if (!values.email || !values.password) { @@ -25,7 +26,7 @@ const LoginForm = ({ setOpen }: any) => { return; } - mutate({ ...values, fcm_token: FCM }); + mutate({ ...values, fcm_token: random_token }); }; useEffect(() => { diff --git a/src/Styles/Layout/NavBar.scss b/src/Styles/Layout/NavBar.scss index a8088bd..dc05cec 100755 --- a/src/Styles/Layout/NavBar.scss +++ b/src/Styles/Layout/NavBar.scss @@ -42,7 +42,7 @@ .active{ opacity: 1; - // border-bottom: .1vw solid var(--primary); + border-bottom: .1vw solid var(--primary); color: var(--primary); } } diff --git a/src/Styles/Page/Cart.scss b/src/Styles/Page/Cart.scss index 8e85f06..a12a8ab 100644 --- a/src/Styles/Page/Cart.scss +++ b/src/Styles/Page/Cart.scss @@ -113,4 +113,19 @@ } } } +} + +.EmptyCard{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + margin-top: 5%; + gap: 20px; + img{ + width: 40%; + } + p{ + font-size: max(1.5vw,15px); + } } \ No newline at end of file