├── npm ├── .eslintrc.json ├── sanity_onlineshop ├── plugins │ └── .gitkeep ├── .eslintrc ├── config │ ├── @sanity │ │ ├── data-aspects.json │ │ ├── vision.json │ │ ├── form-builder.json │ │ ├── default-layout.json │ │ └── default-login.json │ └── .checksums ├── static │ ├── .gitkeep │ └── favicon.ico ├── .npmignore ├── tsconfig.json ├── README.md ├── schemas │ ├── user.js │ └── schema.js ├── sanity.json └── package.json ├── public ├── images │ ├── logo.png │ ├── zishop.ico │ ├── zishopBanner.png │ ├── banners-img │ │ ├── home1.webp │ │ └── home2.webp │ ├── brand-logo-img │ │ ├── hp.webp │ │ ├── lg.webp │ │ ├── apple.webp │ │ ├── asus.webp │ │ ├── benq.webp │ │ ├── del.webp │ │ ├── dior.webp │ │ ├── gucci.webp │ │ ├── mac.webp │ │ ├── msi.webp │ │ ├── puma.webp │ │ ├── rolex.webp │ │ ├── sony.webp │ │ ├── adidas.webp │ │ ├── bvlgari.webp │ │ ├── loreal.webp │ │ ├── samsung.webp │ │ ├── toshiba.webp │ │ ├── versace.webp │ │ ├── xiaomi.webp │ │ ├── maybelline.webp │ │ ├── dolce-gabbana.webp │ │ ├── louis-vuitton.webp │ │ └── patek-philippe.webp │ ├── discount-icon │ │ └── discount.webp │ ├── slider-img │ │ ├── toy-banner.webp │ │ ├── beauty-banner.webp │ │ ├── digital-banner.webp │ │ ├── fashion-banner.webp │ │ ├── house-banner.webp │ │ └── stationery-banner.webp │ ├── benefit-icons │ │ ├── 007-return.webp │ │ ├── 004-headphones.webp │ │ ├── 006-best-seller.webp │ │ ├── 003-cash-on-delivery.webp │ │ └── 005-delivery-truck-2.webp │ ├── carouselBox-bg │ │ └── offersbg.webp │ ├── category-img │ │ ├── toy-category.webp │ │ ├── house-category.webp │ │ ├── sport-category.webp │ │ ├── beauty-category.webp │ │ ├── digital-category.webp │ │ ├── fashion-category.webp │ │ └── stationery-category.webp │ └── category-icon │ │ ├── toy-category.webp │ │ ├── beauty-category.webp │ │ ├── digital-category.webp │ │ ├── fashion-category.webp │ │ ├── house-category.webp │ │ ├── sport-category.webp │ │ └── stationery-category.webp ├── fonts │ ├── ttf │ │ ├── iranyekanwebblack.ttf │ │ ├── iranyekanwebbold.ttf │ │ ├── iranyekanweblight.ttf │ │ ├── iranyekanwebmedium.ttf │ │ ├── iranyekanwebthin.ttf │ │ ├── iranyekanwebregular.ttf │ │ ├── iranyekanwebextrablack.ttf │ │ └── iranyekanwebextrabold.ttf │ └── woff │ │ ├── iranyekanwebbold.woff │ │ ├── iranyekanwebthin.woff │ │ ├── iranyekanwebblack.woff │ │ ├── iranyekanweblight.woff │ │ ├── iranyekanwebmedium.woff │ │ ├── iranyekanwebextrabold.woff │ │ ├── iranyekanwebregular.woff │ │ └── iranyekanwebextrablack.woff ├── sitemap.xml └── robots.txt ├── lib ├── types │ ├── breadcrumb.ts │ ├── dropDown.ts │ ├── offerProductsState.ts │ ├── settingBox.ts │ ├── megaMenu.ts │ ├── categories.ts │ ├── favorite.ts │ ├── activeMenuItem.ts │ ├── productList.ts │ ├── sidebar.ts │ ├── user.ts │ ├── pagePathsParams.ts │ ├── cart.ts │ └── products.ts ├── config.ts └── client.ts ├── pages ├── blank.tsx ├── favorite.tsx ├── api │ ├── hello.ts │ └── users │ │ ├── login.ts │ │ └── register.ts ├── _app.tsx ├── cart.tsx ├── offers.tsx ├── _document.tsx ├── newestProducts.tsx ├── [category] │ ├── index.tsx │ └── [subCategory] │ │ ├── index.tsx │ │ └── [title] │ │ ├── index.tsx │ │ └── [slug] │ │ └── index.tsx ├── login.tsx ├── about.tsx ├── index.tsx └── signUp.tsx ├── mock ├── sortRadioInput.js ├── banner.js ├── benefits.js ├── slider.js ├── category-sm.js ├── footer.js ├── brand.js ├── menuItems.js └── category-lg.js ├── postcss.config.js ├── global.d.ts ├── next-sitemap.config.js ├── utilities ├── changeNumbersFormatEnToFa.ts ├── error.ts ├── calculateDiscountPercentage.ts ├── auth.ts ├── sortByPopularity.ts ├── currencyFormat.ts ├── sortByCost.ts └── sortByTimeStamp.ts ├── next-env.d.ts ├── hooks ├── useLanguage.tsx ├── useWindowDimensions.tsx ├── useCountdown.tsx └── useExchangeRateGBPToIRR.tsx ├── components ├── header │ ├── menu │ │ ├── index.tsx │ │ ├── SideBarMenu │ │ │ ├── index.tsx │ │ │ ├── SideNav.tsx │ │ │ ├── SideBar.tsx │ │ │ └── SideNavContent.tsx │ │ └── MegaMenu │ │ │ ├── index.tsx │ │ │ ├── ExtraMenu.tsx │ │ │ ├── MenusContainer.tsx │ │ │ ├── MegaMenu.tsx │ │ │ └── SubMenu.tsx │ ├── user │ │ ├── index.tsx │ │ ├── LoginBtn.tsx │ │ ├── UserAccountBtn.tsx │ │ └── UserAccountBox.tsx │ ├── Logo.tsx │ ├── SearchBar.tsx │ ├── theme │ │ ├── Theme.tsx │ │ └── ThemeItem.tsx │ ├── Settings.tsx │ ├── language │ │ ├── LanguageItem.tsx │ │ └── Language.tsx │ └── index.tsx ├── UI │ ├── discountCountdown │ │ ├── ExpiredNotice.tsx │ │ ├── DiscountCountdown.tsx │ │ ├── DateTimeDisplay.tsx │ │ └── ShowCounter.tsx │ ├── SectionTitle │ │ └── index.tsx │ ├── CarouselBox │ │ ├── CarouselBoxArrows.tsx │ │ ├── CarouselBoxCard.tsx │ │ └── CarouselBox.tsx │ ├── Input.tsx │ ├── Breadcrumb.tsx │ ├── card │ │ ├── CardActions.tsx │ │ └── Card.tsx │ └── DropDown.tsx ├── brands │ ├── BrandBox.tsx │ └── index.tsx ├── productDetails │ ├── SimilarProducts.tsx │ ├── index.tsx │ ├── ProductPageActions.tsx │ ├── ImageSection.tsx │ ├── DetailsSection.tsx │ └── CallToAction.tsx ├── cart │ ├── CartList.tsx │ ├── OrderSummaryBox.tsx │ └── CartIcon.tsx ├── Offers │ └── Offers.tsx ├── favorite │ ├── index.tsx │ └── FavoriteItem.tsx ├── Benefits │ └── index.tsx ├── carousel │ ├── Arrows.tsx │ ├── Slide.tsx │ └── index.tsx ├── footer │ ├── footerContent │ │ ├── FooterColumns.tsx │ │ └── SocialPart.tsx │ └── index.tsx ├── layout │ └── Layout.tsx ├── banners │ ├── index.tsx │ └── banner-box │ │ └── BannerBox.tsx ├── category │ ├── CategorySmBox.tsx │ ├── CategoryLgBox.tsx │ └── Category.tsx ├── newest │ └── Newest.tsx └── productList │ ├── SubmenuCategory.tsx │ ├── Sort.tsx │ └── ProductList.tsx ├── .gitignore ├── store ├── cartUI-slice.ts ├── megaMenu-slice.ts ├── newestProduct-slice.ts ├── settingBox-slice.ts ├── specialOfferProducts-slice.ts ├── user-slice.ts ├── activeMenuItem-slice.ts ├── favorite-slice.ts ├── sideNavBar-slice.ts ├── index.ts ├── sortedProductList-slice.ts └── cart-slice.ts ├── tsconfig.json ├── next.config.js ├── package.json └── tailwind.config.js /npm: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /sanity_onlineshop/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | User-specific packages can be placed here 2 | -------------------------------------------------------------------------------- /sanity_onlineshop/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@sanity/eslint-config-studio" 3 | } 4 | -------------------------------------------------------------------------------- /sanity_onlineshop/config/@sanity/data-aspects.json: -------------------------------------------------------------------------------- 1 | { 2 | "listOptions": {} 3 | } 4 | -------------------------------------------------------------------------------- /sanity_onlineshop/config/@sanity/vision.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultApiVersion": "2021-10-21" 3 | } 4 | -------------------------------------------------------------------------------- /public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/logo.png -------------------------------------------------------------------------------- /public/images/zishop.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/zishop.ico -------------------------------------------------------------------------------- /lib/types/breadcrumb.ts: -------------------------------------------------------------------------------- 1 | export interface IBreadcrumb { 2 | breadcrumb: string; 3 | href: string; 4 | } 5 | -------------------------------------------------------------------------------- /sanity_onlineshop/config/@sanity/form-builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": { 3 | "directUploads": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /sanity_onlineshop/static/.gitkeep: -------------------------------------------------------------------------------- 1 | Files placed here will be served by the Sanity server under the `/static`-prefix 2 | -------------------------------------------------------------------------------- /public/images/zishopBanner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/zishopBanner.png -------------------------------------------------------------------------------- /lib/config.ts: -------------------------------------------------------------------------------- 1 | const config = { 2 | projectId: "3c4n15ly", 3 | dataset: "production", 4 | }; 5 | export default config; 6 | -------------------------------------------------------------------------------- /lib/types/dropDown.ts: -------------------------------------------------------------------------------- 1 | export interface IDropDown { 2 | title: string; 3 | url?: string; 4 | subtitles: string[]; 5 | } 6 | -------------------------------------------------------------------------------- /public/images/banners-img/home1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/banners-img/home1.webp -------------------------------------------------------------------------------- /public/images/banners-img/home2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/banners-img/home2.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/hp.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/hp.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/lg.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/lg.webp -------------------------------------------------------------------------------- /sanity_onlineshop/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/sanity_onlineshop/static/favicon.ico -------------------------------------------------------------------------------- /public/fonts/ttf/iranyekanwebblack.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/fonts/ttf/iranyekanwebblack.ttf -------------------------------------------------------------------------------- /public/fonts/ttf/iranyekanwebbold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/fonts/ttf/iranyekanwebbold.ttf -------------------------------------------------------------------------------- /public/fonts/ttf/iranyekanweblight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/fonts/ttf/iranyekanweblight.ttf -------------------------------------------------------------------------------- /public/fonts/ttf/iranyekanwebmedium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/fonts/ttf/iranyekanwebmedium.ttf -------------------------------------------------------------------------------- /public/fonts/ttf/iranyekanwebthin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/fonts/ttf/iranyekanwebthin.ttf -------------------------------------------------------------------------------- /public/fonts/woff/iranyekanwebbold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/fonts/woff/iranyekanwebbold.woff -------------------------------------------------------------------------------- /public/fonts/woff/iranyekanwebthin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/fonts/woff/iranyekanwebthin.woff -------------------------------------------------------------------------------- /public/images/brand-logo-img/apple.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/apple.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/asus.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/asus.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/benq.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/benq.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/del.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/del.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/dior.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/dior.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/gucci.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/gucci.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/mac.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/mac.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/msi.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/msi.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/puma.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/puma.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/rolex.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/rolex.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/sony.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/sony.webp -------------------------------------------------------------------------------- /sanity_onlineshop/config/@sanity/default-layout.json: -------------------------------------------------------------------------------- 1 | { 2 | "toolSwitcher": { 3 | "order": [], 4 | "hidden": [] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /public/fonts/ttf/iranyekanwebregular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/fonts/ttf/iranyekanwebregular.ttf -------------------------------------------------------------------------------- /public/fonts/woff/iranyekanwebblack.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/fonts/woff/iranyekanwebblack.woff -------------------------------------------------------------------------------- /public/fonts/woff/iranyekanweblight.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/fonts/woff/iranyekanweblight.woff -------------------------------------------------------------------------------- /public/fonts/woff/iranyekanwebmedium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/fonts/woff/iranyekanwebmedium.woff -------------------------------------------------------------------------------- /public/images/brand-logo-img/adidas.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/adidas.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/bvlgari.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/bvlgari.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/loreal.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/loreal.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/samsung.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/samsung.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/toshiba.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/toshiba.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/versace.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/versace.webp -------------------------------------------------------------------------------- /public/images/brand-logo-img/xiaomi.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/brand-logo-img/xiaomi.webp -------------------------------------------------------------------------------- /public/images/discount-icon/discount.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/discount-icon/discount.webp -------------------------------------------------------------------------------- /public/images/slider-img/toy-banner.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZahraMirzaei/online-shop/HEAD/public/images/slider-img/toy-banner.webp -------------------------------------------------------------------------------- /pages/blank.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const Blank = () => { 4 | return
{t.expireDiscount}
9 |{dateTime}
22 | {t[`${type}`]} 23 |14 | {t.login} | {t.signUp} 15 |
16 |{t.thereAreNoFavorites}
25 | )} 26 |:
15 |:
17 |:
19 |24 | {t[`${benefitItem.title}`]} 25 |
26 |30 | {t[`${description}`]} 31 |
32 |{product?.name}
41 |{t.aboutLongText}
14 |
16 |
{t.aboutEnjoy}
44 |{t.myName}
45 |42 | {locale === "en" ? "En" : "Fa"} 43 |
44 |26 | {t.totalQuantity} 27 |
28 |29 | {locale === "en" 30 | ? totalQuantity 31 | : changeNumbersFormatEnToFa(totalQuantity)} 32 |
33 |36 | {t.totalAmount} 37 |
38 |49 | {t.cartIsEmpty} 50 |
51 | )} 52 | > 53 | ); 54 | }; 55 | 56 | export default OrderSummaryBox; 57 | -------------------------------------------------------------------------------- /components/cart/CartIcon.tsx: -------------------------------------------------------------------------------- 1 | import React, { useRef } from "react"; 2 | import Link from "next/link"; 3 | import { useDispatch, useSelector } from "react-redux"; 4 | import { Transition } from "react-transition-group"; 5 | import { AiOutlineShoppingCart } from "react-icons/ai"; 6 | import { cartUiActions } from "../../store/cartUI-slice"; 7 | import CartBox from "./CartBox"; 8 | import { ICartUiRootState, ICartRootState } from "../../lib/types/cart"; 9 | import { changeNumbersFormatEnToFa } from "../../utilities/changeNumbersFormatEnToFa"; 10 | import { useLanguage } from "../../hooks/useLanguage"; 11 | 12 | const Basket = () => { 13 | const dispatch = useDispatch(); 14 | const { locale } = useLanguage(); 15 | const showCartBox = useSelector( 16 | (state: ICartUiRootState) => state.cartUi.cartBoxIsVisible 17 | ); 18 | const cartItemQuantity = useSelector( 19 | (state: ICartRootState) => state.cart.totalQuantity 20 | ); 21 | 22 | const nodeRef = useRef46 | {t[`${description}`]} 47 |
48 | 49 | 50 | {t[`${buttonText}`]} 51 | 52 | 53 |28 | {product.starRating} {t.stars} 29 |
30 |52 | {detailsValue} 53 |
54 |{t.noProduct}
69 | )} 70 |{t.price}
62 |77 | {t.noProduct} 78 |
79 | )} 80 |{product?.name}
63 |