홈 업로드
This commit is contained in:
parent
11f7cdf425
commit
1fa6f72233
@ -22,12 +22,12 @@ export default async function ShopComponent() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography variant="h2" color="text.primary" textAlign="center">
|
{/* <Typography variant="h2" color="text.primary" textAlign="center">
|
||||||
All Shops
|
All Shops
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body1" color="text.secondary" textAlign="center">
|
<Typography variant="body1" color="text.secondary" textAlign="center">
|
||||||
Lorem Ipsum Is Simply Dummy Text Of The Printing And Typesetting Industry.
|
Lorem Ipsum Is Simply Dummy Text Of The Printing And Typesetting Industry.
|
||||||
</Typography>
|
</Typography> */}
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Grid container spacing={2} justifyContent="center" alignItems="center">
|
<Grid container spacing={2} justifyContent="center" alignItems="center">
|
||||||
|
@ -15,7 +15,6 @@ import { IoIosArrowForward } from 'react-icons/io';
|
|||||||
import { lang } from 'src/components/lang/kr';
|
import { lang } from 'src/components/lang/kr';
|
||||||
export default function Index() {
|
export default function Index() {
|
||||||
const { data, isLoading } = useQuery(['featured-products'], () => api.getFeaturedProducts());
|
const { data, isLoading } = useQuery(['featured-products'], () => api.getFeaturedProducts());
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Stack
|
<Stack
|
||||||
|
@ -9,10 +9,11 @@ import { Typography, Grid, Box, Stack, Paper, Button } from '@mui/material';
|
|||||||
// icons
|
// icons
|
||||||
import { IoIosArrowForward } from 'react-icons/io';
|
import { IoIosArrowForward } from 'react-icons/io';
|
||||||
// component
|
// component
|
||||||
import ShopCard from 'src/components/cards/shop';
|
// import ShopCard from 'src/components/cards/shop';
|
||||||
import { lang } from 'src/components/lang/kr';
|
import { lang } from 'src/components/lang/kr';
|
||||||
|
import ShopComponent from 'src/app/(user)/shops/page';
|
||||||
|
|
||||||
export default function ShopComponent() {
|
export default function ShopComponent2() {
|
||||||
const { shops = [], isLoading } = useSelector(({ shops }) => shops);
|
const { shops = [], isLoading } = useSelector(({ shops }) => shops);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -49,13 +50,11 @@ export default function ShopComponent() {
|
|||||||
|
|
||||||
<Box>
|
<Box>
|
||||||
<Grid container spacing={2} justifyContent="center" alignItems="center">
|
<Grid container spacing={2} justifyContent="center" alignItems="center">
|
||||||
{(isLoading ? Array.from(new Array(6)) : shops)?.map((inner) => (
|
<Grid item lg={3} md={4} sm={6} xs={12}>
|
||||||
<React.Fragment key={Math.random()}>
|
{/* <ShopCard shop={inner} isLoading={isLoading} /> */}
|
||||||
<Grid item lg={3} md={4} sm={6} xs={12}>
|
<ShopComponent />
|
||||||
<ShopCard shop={inner} isLoading={isLoading} />
|
</Grid>
|
||||||
</Grid>
|
|
||||||
</React.Fragment>
|
|
||||||
))}
|
|
||||||
{!isLoading && !Boolean(shops?.length) && (
|
{!isLoading && !Boolean(shops?.length) && (
|
||||||
<Typography variant="h3" color="error.main" textAlign="center">
|
<Typography variant="h3" color="error.main" textAlign="center">
|
||||||
Shop not found
|
Shop not found
|
||||||
|
@ -119,7 +119,7 @@ export default function ProductForm({
|
|||||||
subCategory: currentProduct?.subCategory || (categories.length && categories[0].subCategories[0]?._id) || '',
|
subCategory: currentProduct?.subCategory || (categories.length && categories[0].subCategories[0]?._id) || '',
|
||||||
status: currentProduct?.status || STATUS_OPTIONS[0],
|
status: currentProduct?.status || STATUS_OPTIONS[0],
|
||||||
blob: currentProduct?.blob || [],
|
blob: currentProduct?.blob || [],
|
||||||
isFeatured: currentProduct?.isFeatured || false,
|
isFeatured: currentProduct?.isFeatured || true,
|
||||||
sku: currentProduct?.sku || '',
|
sku: currentProduct?.sku || '',
|
||||||
price: currentProduct?.price || '',
|
price: currentProduct?.price || '',
|
||||||
priceSale: currentProduct?.priceSale || '',
|
priceSale: currentProduct?.priceSale || '',
|
||||||
|
Loading…
Reference in New Issue
Block a user