File tree Expand file tree Collapse file tree 6 files changed +29
-9
lines changed
app/[locale]/(main)/(homepage) Expand file tree Collapse file tree 6 files changed +29
-9
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1+ 'use client' ;
2+
3+ import { Box , darken , styled } from '@mui/material' ;
4+ import { blueGrey } from '@mui/material/colors' ;
5+
6+ const ColorfulSection = styled ( Box ) < { } > ( ( { theme } ) => ( {
7+ padding : theme . spacing ( 2 , 0 ) ,
8+ backgroundColor :
9+ theme . palette . mode === 'light'
10+ ? blueGrey [ '50' ]
11+ : darken ( blueGrey [ '900' ] , 0.5 ) ,
12+ width : '100%' ,
13+ } ) ) ;
14+
15+ export default ColorfulSection ;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import ProductsSlider from './components/ProductsSlider';
2626import SlidersContainer from './components/SlidersContainer' ;
2727import SlidersSkeleton from './components/SlidersSkeleton' ;
2828import { Header } from '@/components/Header' ;
29+ import ColorfulSection from './components/ColorfulSection' ;
2930
3031const getCategories = async ( ) => {
3132 const { data } = await getClient ( ) . query < GetMainCategoriesQuery > ( {
@@ -181,17 +182,11 @@ export default async function Home() {
181182 </ SlidersContainer >
182183
183184 { ! ! _posts . length && (
184- < Box
185- sx = { {
186- py : 2 ,
187- bgcolor : '#f1f4f7' ,
188- width : '100%' ,
189- } }
190- >
185+ < ColorfulSection >
191186 < SlidersContainer >
192187 < PostsSlider items = { _posts } />
193188 </ SlidersContainer >
194- </ Box >
189+ </ ColorfulSection >
195190 ) }
196191 </ Stack >
197192 </ >
Original file line number Diff line number Diff line change 11import React , { FC } from 'react' ;
22import Image from './Image' ;
33import { ImageProps } from 'next/image' ;
4+ import { useTheme } from '@mui/material' ;
45
56const Logo : FC < Partial < ImageProps > > = ( props ) => {
7+ const options = {
8+ dark : '/assets/images/logo-dark.svg' ,
9+ light : '/assets/images/logo-light.svg' ,
10+ } ;
11+
12+ const theme = useTheme ( ) ;
13+
614 return (
715 < Image
816 draggable = { false }
917 width = { 176 }
1018 height = { 32 }
1119 alt = "Logo"
12- src = "/assets/images/logo.svg"
20+ src = { options [ theme . palette . mode ] }
1321 style = { {
1422 width : 'fit-content' ,
1523 } }
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ const themeOptions: ThemeOptions = {
7070 main : green [ 500 ] ,
7171 contrastText : '#fff' ,
7272 lighter : green [ 200 ] ,
73+ ...green ,
7374 } ,
7475 } ,
7576 shape : {
You can’t perform that action at this time.
0 commit comments