fix build + add logo and name
This commit is contained in:
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 72 KiB |
@@ -22,6 +22,7 @@ import { useInfiniteBrandProductsData } from '../hooks/useInfiniteBrandData'
|
||||
import { IProduct } from '@/types/landing.types'
|
||||
import { Product } from '../types/Types'
|
||||
import { useSearchParams, useParams } from 'next/navigation'
|
||||
import { SHOP_CONFIG } from '@/config/const'
|
||||
|
||||
const BrandPage: NextPage = () => {
|
||||
const [showMobileFilters, setShowMobileFilters] = useState(false)
|
||||
@@ -103,8 +104,16 @@ const BrandPage: NextPage = () => {
|
||||
market_status: defaultVariant?.market_status || 'active',
|
||||
price: price,
|
||||
stock: defaultVariant?.stock || 0,
|
||||
postingTime: defaultVariant?.postingTime || 0,
|
||||
isFreeShip: defaultVariant?.isFreeShip || false,
|
||||
isWholeSale: defaultVariant?.isWholeSale || false
|
||||
isWholeSale: defaultVariant?.isWholeSale || false,
|
||||
shop: defaultVariant?.shop || { _id: '', shopName: '', shopDescription: '', logo: '' },
|
||||
shipmentMethod: (defaultVariant?.shipmentMethod || []).map(method => ({
|
||||
...method,
|
||||
deliveryType: method.deliveryType as "Standard" | "SameDay" | "Express"
|
||||
})),
|
||||
warranty: defaultVariant?.warranty || { _id: 0, duration: '', logoUrl: '', name: '' },
|
||||
meterage: defaultVariant?.meterage ? [defaultVariant.meterage] : []
|
||||
},
|
||||
variants: (product.variants || []).map(variant => ({
|
||||
...variant,
|
||||
@@ -128,7 +137,7 @@ const BrandPage: NextPage = () => {
|
||||
<Breadcrumb aria-label="breadcrumb">
|
||||
<BreadcrumbList className="text-sm text-muted-foreground">
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbLink href="/">فروشگاه آناهیتا</BreadcrumbLink>
|
||||
<BreadcrumbLink href="/">{SHOP_CONFIG.fullName}</BreadcrumbLink>
|
||||
</BreadcrumbItem>
|
||||
{data?.pages?.[0]?.results.brand && (
|
||||
<>
|
||||
|
||||
@@ -86,8 +86,16 @@ const BrandProductsCarousel: FC<Props> = ({ products, brandName }) => {
|
||||
market_status: defaultVariant?.market_status || 'active',
|
||||
price: price,
|
||||
stock: defaultVariant?.stock || 0,
|
||||
postingTime: defaultVariant?.postingTime || 0,
|
||||
isFreeShip: defaultVariant?.isFreeShip || false,
|
||||
isWholeSale: defaultVariant?.isWholeSale || false
|
||||
isWholeSale: defaultVariant?.isWholeSale || false,
|
||||
shop: defaultVariant?.shop || { _id: '', shopName: '', shopDescription: '', logo: '' },
|
||||
shipmentMethod: defaultVariant?.shipmentMethod?.map(method => ({
|
||||
...method,
|
||||
deliveryType: method.deliveryType as "Standard" | "SameDay" | "Express"
|
||||
})) || [],
|
||||
warranty: defaultVariant?.warranty || { _id: 0, duration: '', logoUrl: '', name: '' },
|
||||
meterage: defaultVariant?.meterage ? [defaultVariant.meterage] : []
|
||||
},
|
||||
variants: (product.variants || []).map(variant => ({
|
||||
...variant,
|
||||
|
||||
@@ -82,8 +82,16 @@ const ProductGrid: FC<Props> = ({ products, isLoading = false }) => {
|
||||
market_status: defaultVariant?.market_status || 'active',
|
||||
price: price,
|
||||
stock: defaultVariant?.stock || 0,
|
||||
postingTime: defaultVariant?.postingTime || 0,
|
||||
isFreeShip: defaultVariant?.isFreeShip || false,
|
||||
isWholeSale: defaultVariant?.isWholeSale || false
|
||||
isWholeSale: defaultVariant?.isWholeSale || false,
|
||||
shop: defaultVariant?.shop || { _id: '', shopName: '', shopDescription: '', logo: '' },
|
||||
shipmentMethod: defaultVariant?.shipmentMethod?.map(method => ({
|
||||
...method,
|
||||
deliveryType: method.deliveryType as "Standard" | "SameDay" | "Express"
|
||||
})) || [],
|
||||
warranty: defaultVariant?.warranty || { _id: 0, duration: '', logoUrl: '', name: '' },
|
||||
meterage: defaultVariant?.meterage ? [defaultVariant.meterage] : []
|
||||
},
|
||||
variants: (product.variants || []).map(variant => ({
|
||||
...variant,
|
||||
|
||||
+7
-3
@@ -8,10 +8,14 @@ import ToastContainer from "@/components/Toast";
|
||||
import MobileBottomMenu from "@/components/MobileBottomMenu";
|
||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
|
||||
import { viewport } from './viewport'
|
||||
import { SHOP_CONFIG } from "@/config/const";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Create Next App",
|
||||
description: "Generated by create next app",
|
||||
title: `${SHOP_CONFIG.fullName} | ${SHOP_CONFIG.englishName}`,
|
||||
description: SHOP_CONFIG.description,
|
||||
icons: {
|
||||
icon: '/favicon.svg',
|
||||
},
|
||||
};
|
||||
|
||||
export { viewport };
|
||||
@@ -22,7 +26,7 @@ export default function RootLayout({
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<html lang="fa" dir="rtl">
|
||||
<body>
|
||||
<QueryProvider>
|
||||
{children}
|
||||
|
||||
@@ -39,8 +39,18 @@ const FavoritePage: NextPage = () => {
|
||||
market_status: item.variant.market_status,
|
||||
price: item.variant.price,
|
||||
stock: item.variant.stock,
|
||||
postingTime: item.variant.postingTime,
|
||||
isFreeShip: item.variant.isFreeShip,
|
||||
isWholeSale: item.variant.isWholeSale,
|
||||
shop: {
|
||||
_id: item.variant.shop._id,
|
||||
shopName: item.variant.shop.shopName,
|
||||
shopDescription: item.variant.shop.shopDescription,
|
||||
logo: item.variant.shop.logo,
|
||||
},
|
||||
shipmentMethod: [],
|
||||
warranty: item.variant.warranty,
|
||||
meterage: item.variant.meterage ? [{ _id: 0, value: item.variant.meterage.toString() }] : [],
|
||||
},
|
||||
variants: [{
|
||||
_id: item.variant._id,
|
||||
|
||||
@@ -9,4 +9,6 @@ export const PRIMARY_COLOR = "#DA2129";
|
||||
export const SHOP_CONFIG = {
|
||||
name: "فجر مرکزی", // نام فروشگاه - میتوان آن را تغییر داد
|
||||
fullName: "تابلو فجر مرکزی", // نام کامل فروشگاه
|
||||
englishName: "Tablo Fajr Center", // نام کامل فروشگاه به زبان انگلیسی
|
||||
description: "فروشگاه آنلاین تابلو فجر مرکزی", // توضیحات فروشگاه
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user