diff --git a/src/app/[locale]/(main)/(container)/(homepage)/loading.tsx b/src/app/[locale]/(main)/(container)/(homepage)/loading.tsx deleted file mode 100644 index 9b78021..0000000 --- a/src/app/[locale]/(main)/(container)/(homepage)/loading.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { VariableProductItemSkeleton } from '@/components/VariableProductItem'; -import { Card, CardContent, Grid, Skeleton, Stack } from '@mui/material'; - -const Loading = () => { - return ( - - - - - - - {new Array(4).fill(1).map((item, index) => { - return ( - - - - - - - ); - })} - - - {new Array(3).fill(1).map((item) => ( - - - - - {new Array(6).fill(1).map((item, index) => { - return ( - - - - ); - })} - - - - - ))} - - ); -}; - -export default Loading; diff --git a/src/app/[locale]/(main)/(container)/layout.tsx b/src/app/[locale]/(main)/(container)/layout.tsx index d5303b5..5bee65e 100644 --- a/src/app/[locale]/(main)/(container)/layout.tsx +++ b/src/app/[locale]/(main)/(container)/layout.tsx @@ -11,20 +11,21 @@ const Layout: FC = async ({ children }) => { return ( <> - {children} - + diff --git a/src/app/[locale]/(main)/(container)/(homepage)/components/Header.tsx b/src/app/[locale]/(main)/(homepage)/components/Header.tsx similarity index 100% rename from src/app/[locale]/(main)/(container)/(homepage)/components/Header.tsx rename to src/app/[locale]/(main)/(homepage)/components/Header.tsx diff --git a/src/app/[locale]/(main)/(container)/(homepage)/components/MainCategories.tsx b/src/app/[locale]/(main)/(homepage)/components/MainCategories.tsx similarity index 96% rename from src/app/[locale]/(main)/(container)/(homepage)/components/MainCategories.tsx rename to src/app/[locale]/(main)/(homepage)/components/MainCategories.tsx index f26d51a..45e84a3 100644 --- a/src/app/[locale]/(main)/(container)/(homepage)/components/MainCategories.tsx +++ b/src/app/[locale]/(main)/(homepage)/components/MainCategories.tsx @@ -4,7 +4,7 @@ import { ChevronLeft } from '@mui/icons-material'; import { Box, Grid, Link, Stack } from '@mui/material'; import { grey } from '@mui/material/colors'; import React, { FC } from 'react'; -import Image from '../../../../../../components/common/Image'; +import Image from '@/components/common/Image'; export interface IMainCategory { id: number | string; diff --git a/src/app/[locale]/(main)/(container)/(homepage)/components/MainSlider/MainSlider.tsx b/src/app/[locale]/(main)/(homepage)/components/MainSlider/MainSlider.tsx similarity index 100% rename from src/app/[locale]/(main)/(container)/(homepage)/components/MainSlider/MainSlider.tsx rename to src/app/[locale]/(main)/(homepage)/components/MainSlider/MainSlider.tsx diff --git a/src/app/[locale]/(main)/(container)/(homepage)/components/MainSlider/components/SliderItem/SliderItem.tsx b/src/app/[locale]/(main)/(homepage)/components/MainSlider/components/SliderItem/SliderItem.tsx similarity index 100% rename from src/app/[locale]/(main)/(container)/(homepage)/components/MainSlider/components/SliderItem/SliderItem.tsx rename to src/app/[locale]/(main)/(homepage)/components/MainSlider/components/SliderItem/SliderItem.tsx diff --git a/src/app/[locale]/(main)/(container)/(homepage)/components/MainSlider/components/SliderItem/index.ts b/src/app/[locale]/(main)/(homepage)/components/MainSlider/components/SliderItem/index.ts similarity index 100% rename from src/app/[locale]/(main)/(container)/(homepage)/components/MainSlider/components/SliderItem/index.ts rename to src/app/[locale]/(main)/(homepage)/components/MainSlider/components/SliderItem/index.ts diff --git a/src/app/[locale]/(main)/(container)/(homepage)/components/MainSlider/index.ts b/src/app/[locale]/(main)/(homepage)/components/MainSlider/index.ts similarity index 100% rename from src/app/[locale]/(main)/(container)/(homepage)/components/MainSlider/index.ts rename to src/app/[locale]/(main)/(homepage)/components/MainSlider/index.ts diff --git a/src/app/[locale]/(main)/(container)/(homepage)/components/MainSlider/types/index.ts b/src/app/[locale]/(main)/(homepage)/components/MainSlider/types/index.ts similarity index 100% rename from src/app/[locale]/(main)/(container)/(homepage)/components/MainSlider/types/index.ts rename to src/app/[locale]/(main)/(homepage)/components/MainSlider/types/index.ts diff --git a/src/app/[locale]/(main)/(container)/(homepage)/components/ProductsSlider.tsx b/src/app/[locale]/(main)/(homepage)/components/ProductsSlider.tsx similarity index 100% rename from src/app/[locale]/(main)/(container)/(homepage)/components/ProductsSlider.tsx rename to src/app/[locale]/(main)/(homepage)/components/ProductsSlider.tsx diff --git a/src/app/[locale]/(main)/(container)/(homepage)/components/SearchDialog.tsx b/src/app/[locale]/(main)/(homepage)/components/SearchDialog.tsx similarity index 100% rename from src/app/[locale]/(main)/(container)/(homepage)/components/SearchDialog.tsx rename to src/app/[locale]/(main)/(homepage)/components/SearchDialog.tsx diff --git a/src/app/[locale]/(main)/(container)/(homepage)/components/SearchSection.tsx b/src/app/[locale]/(main)/(homepage)/components/SearchSection.tsx similarity index 100% rename from src/app/[locale]/(main)/(container)/(homepage)/components/SearchSection.tsx rename to src/app/[locale]/(main)/(homepage)/components/SearchSection.tsx diff --git a/src/app/[locale]/(main)/(homepage)/loading.tsx b/src/app/[locale]/(main)/(homepage)/loading.tsx new file mode 100644 index 0000000..426a14a --- /dev/null +++ b/src/app/[locale]/(main)/(homepage)/loading.tsx @@ -0,0 +1,63 @@ +import { VariableProductItemSkeleton } from '@/components/VariableProductItem'; +import { + Card, + CardContent, + Container, + Grid, + Skeleton, + Stack, +} from '@mui/material'; + +const Loading = () => { + return ( + + + + + + + + + + + {new Array(4).fill(1).map((item, index) => { + return ( + + + + + + + ); + })} + + + {new Array(3).fill(1).map((item) => ( + + + + + {new Array(6).fill(1).map((item, index) => { + return ( + + + + ); + })} + + + + + ))} + + + + + ); +}; + +export default Loading; diff --git a/src/app/[locale]/(main)/(container)/(homepage)/page.tsx b/src/app/[locale]/(main)/(homepage)/page.tsx similarity index 79% rename from src/app/[locale]/(main)/(container)/(homepage)/page.tsx rename to src/app/[locale]/(main)/(homepage)/page.tsx index d63fc05..9e43dbf 100644 --- a/src/app/[locale]/(main)/(container)/(homepage)/page.tsx +++ b/src/app/[locale]/(main)/(homepage)/page.tsx @@ -14,7 +14,7 @@ import { menuOrderSortOptions, newestSortOption, } from '@/static/sortOptions'; -import { Grid } from '@mui/material'; +import { Container, Grid, Stack } from '@mui/material'; import { getTranslations } from 'next-intl/server'; import Header from './components/Header'; import MainCategories from './components/MainCategories'; @@ -124,25 +124,31 @@ export default async function Home() { - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/app/[locale]/(main)/layout.tsx b/src/app/[locale]/(main)/layout.tsx index ca4570f..1a08a30 100644 --- a/src/app/[locale]/(main)/layout.tsx +++ b/src/app/[locale]/(main)/layout.tsx @@ -1,4 +1,4 @@ -import { ISliderItem } from '@/app/[locale]/(main)/(container)/(homepage)/components/MainSlider/types'; +import { ISliderItem } from '@/app/[locale]/(main)/(homepage)/components/MainSlider/types'; import { Footer } from '@/components/Footer'; import { Header } from '@/components/Header'; import { DesktopHeader } from '@/components/Header/components'; diff --git a/src/components/Header/components/TopBanner.tsx b/src/components/Header/components/TopBanner.tsx index e58b339..6fa1497 100644 --- a/src/components/Header/components/TopBanner.tsx +++ b/src/components/Header/components/TopBanner.tsx @@ -1,4 +1,4 @@ -import { ISliderItem } from '@/app/[locale]/(main)/(container)/(homepage)/components/MainSlider/types'; +import { ISliderItem } from '@/app/[locale]/(main)/(homepage)/components/MainSlider/types'; import Image from 'next/image'; import React, { FC } from 'react';