Skip to content
Open
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
8 changes: 6 additions & 2 deletions i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@
"new": "New",
"today_deals": "Today's deals",
"best_sellers": "Best sellers",
"no_products_found": "No products found"
"no_products_found": "No products found",
"seller_hero_title": "Join Nuvann Store today and start earning with your shop!",
"seller_hero_desc": "Sell ​​all your products in Nuvann Store and have thousands of customers all over the world.",
"become_a_seller_button": "Become a seller"
},
"details": {
"add_to_cart": "Add to cart",
Expand All @@ -96,7 +99,8 @@
"see_more": "See more shipping options",
"see_less": "See less shipment options",
"unavailable": "Unavailable",
"unit_s": "unit(s)"
"unit_s": "unit(s)",
"not_available_message": "This item cannot be shipped to your selected delivery location."
},
"cart": {
"shopping_cart": "Shopping cart",
Expand Down
9 changes: 6 additions & 3 deletions i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@
"new": "Nuevo",
"today_deals": "Ofertas del día",
"best_sellers": "Los más vendidos",
"no_products_found": "No se encontraron productos"

"no_products_found": "No se encontraron productos",
"seller_hero_title": "¡Únete a Nuvann Store hoy y comienza a ganar con tu tienda!",
"seller_hero_desc": "Vende tus productos en Nuvann Store y llega a miles de clientes en todo el mundo.",
"become_a_seller_button": "Conviértete en vendedor"
},
"details": {
"available_s": "Disponible",
Expand All @@ -97,7 +99,8 @@
"see_more": "Ver más opciones de envío",
"see_less": "Ver menos opciones de envío",
"unavailable": "No disponible",
"unit_s": "unidad(es)"
"unit_s": "unidad(es)",
"not_available_message": "Este artículo no se puede enviar a la ubicación de entrega seleccionada."
},
"cart": {
"shopping_cart": "Carro de la compra",
Expand Down
8 changes: 6 additions & 2 deletions i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@
"today_deals": "Offres du jour",
"best_sellers": "Meilleures ventes",
"no_products_found": "Aucun produit trouvé",
"please_select_size_or_color": "Veuillez sélectionner une taille ou une couleur"
"please_select_size_or_color": "Veuillez sélectionner une taille ou une couleur",
"seller_hero_title": "Rejoignez Nuvann Store aujourd'hui et commencez à gagner avec votre boutique!",
"seller_hero_desc": "Vendez vos produits sur Nuvann Store et attirez des milliers de clients à travers le monde.",
"become_a_seller_button": "Devenir vendeur"
},
"details": {
"available_s": "Disponible(s)",
Expand All @@ -97,7 +100,8 @@
"see_more": "Voir plus d'options d'expédition",
"see_less": "Voir moins d'options d'expédition",
"unavailable": "Indisponible",
"unit_s": "unité(s)"
"unit_s": "unité(s)",
"not_available_message": "Cet article ne peut pas être expédié à l'adresse de livraison sélectionnée."
},
"cart": {
"shopping_cart": "Panier",
Expand Down
8 changes: 6 additions & 2 deletions i18n/locales/ht.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@
"today_deals": "Òf jounen an",
"best_sellers": "Pwodui ki vann plis",
"no_products_found": "Pa gen pwodui disponib",
"please_select_size_or_color": "Tanpri chwazi yon gwosè oswa yon koulè"
"please_select_size_or_color": "Tanpri chwazi yon gwosè oswa yon koulè",
"seller_hero_title": "Jwenn Nuvann Store jodi a epi kòmanse fè lajan ak boutik ou an!",
"seller_hero_desc": "Vann pwodwi ou yo sou Nuvann Store epi atire plizyè milye kliyan atravè mond lan.",
"become_a_seller_button": "Vin yon machann"
},
"details": {
"available_s": "Disponib",
Expand All @@ -98,7 +101,8 @@
"see_more": "Wè plis opsyon livrezon",
"see_less": "Wè mwens opsyon livrezon",
"unavailable": "Non disponib",
"unit_s": "inite"
"unit_s": "inite",
"not_available_message": "Atik sa a pa disponib nan peyi ou ye an."
},
"cart": {
"shopping_cart": "Panye",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuvann-store",
"version": "0.1.135",
"version": "0.1.140",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
1 change: 1 addition & 0 deletions public/assets/hero/heroOnboarding.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions src/components/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { use } from 'react'
import { AiOutlineUser, AiOutlineShoppingCart, AiOutlineLogout } from 'react-icons/ai';
import {FaMapMarkerAlt, FaPhoneAlt, FaEnvelope} from 'react-icons/fa';
import React from 'react'
import { AiOutlineShoppingCart } from 'react-icons/ai';
import Image from 'next/image';
import styles from './styles.module.scss'

Expand Down
37 changes: 16 additions & 21 deletions src/components/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { useCountriesInfo } from '@/hooks/use-countries-info';
import { formatCountriesArray } from '@/utils/format-countries-array';
import { UserRoles } from '@/utils/enums/user.enum';
import { useNavigation } from '@/hooks/useNavigation';
import { RoutesUrls } from '@/utils/enums/routesUrl';
import { RoutesUrls, RouteUrl } from '@/utils/enums/routesUrl';
import { Category } from '@/contexts/categories/types';
import { useRouter } from 'next/router';
import getDeviceType from '@/utils/get-device-type';
Expand All @@ -42,41 +42,36 @@ export const Navbar: React.FC = () => {
logout, isAuthenticated,
loginWithRedirect: handleLogin,
} = useAuth0();
const {countries} = useCountriesInfo();
const { cartState} = useCartInfo();
const { categoriesState} = useCategoriesInfo();
const {dispatch: userDispatch} =useUser();
const {
handleBecomeSeller,
getUserInfo,
user: userInfos,
isLoading: userInfosLoader,
modalTerm,
token,
setModalTerm
} = useUserInfo();
const [businessName, setBusinessName] = React.useState<string>("");
const [selectedCountry, setSelectedCountry] = React.useState<selectedCountry[] | any>([]);
const { redirect } = useNavigation();


const handleClickToBecomeSeller = () => {
if(!isAuthenticated) {
return handleLogin();
}
// if(!isAuthenticated) {
// return handleLogin();
// }
cookie.setCookie({name: 'nuvann_store_referral', days: 1, value: generateRandomString(24), domain: process.env.NEXT_PUBLIC_COOKIE_DOMAIN || ''});
if(Array.isArray(userInfos?.roles) && userInfos?.roles?.some(role => [UserRoles.SELLER, UserRoles.ADMINISTRATOR]?.includes(role))) {
return window.open(process.env.NEXT_PUBLIC_DASHBOARD_ACCESS_URL as string, '_blank');
}
setModalTerm(true)
// setModalTerm(true)
redirect('/seller-onboarding' as RouteUrl);
}

const handleRedirectToCategory = (category: Category) => {
redirect(`/search?category_id=${category.id}` as RoutesUrls);
redirect(`/search?category_id=${category.id}` as RouteUrl);
}

const handleSearch = (searchText: string) => {
redirect(`/search?search=${searchText}` as RoutesUrls)
redirect(`/search?search=${searchText}` as RouteUrl)
}

const setSession = async() => {
Expand All @@ -88,12 +83,12 @@ export const Navbar: React.FC = () => {
}


React.useEffect(() => {
if(becomeseller) {
handleClickToBecomeSeller();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [becomeseller]);
// React.useEffect(() => {
// if(becomeseller) {
// handleClickToBecomeSeller();
// }
// // eslint-disable-next-line react-hooks/exhaustive-deps
// }, [becomeseller]);

const onLogout = () => {
logout();
Expand Down Expand Up @@ -171,7 +166,7 @@ export const Navbar: React.FC = () => {
)

}
<ModalActions
{/* <ModalActions
title={t('term_and_contitions')}
titleLink='https://faqs.nuvann.com/en/termes-et-conditions'
open ={modalTerm}
Expand All @@ -187,7 +182,7 @@ export const Navbar: React.FC = () => {
>
<CustomInput placeholder='Ex: Nuvann Store' label={t('business_name')} type='text' value={businessName} onChange={(e: any) =>setBusinessName(e)} />
<CustomSelect options={countries.length && formatCountriesArray(countries) as any} onSelect={(e)=> setSelectedCountry(e)} title={t('country')} />
</ModalActions>
</ModalActions> */}
</>
);
};
Loading