11import { Box , Img , Text , useColorMode } from '@chakra-ui/react' ;
2- import { TypeWriterText } from '@components' ;
3- import { color } from 'framer-motion' ;
2+ import { TypeWriterText , useColorSelector } from '@components' ;
43import { useTranslation } from 'react-i18next' ;
54
65const Home = ( ) => {
76 const { t } = useTranslation ( ) ;
8- const { colorMode } = useColorMode ( ) ;
7+ const { text , gradient } = useColorSelector ( ) ;
98
109 return (
1110 < Box
@@ -25,7 +24,7 @@ const Home = () => {
2524 < Text
2625 fontSize = "3xl"
2726 fontWeight = "bold"
28- bgGradient = { 'linear(to-b, green.500, blue.500)' }
27+ bgGradient = { text . Hero }
2928 bgClip = { 'text' }
3029 fontFamily = { 'monospace' }
3130 >
@@ -35,7 +34,7 @@ const Home = () => {
3534 < Text
3635 fontSize = "6xl"
3736 fontWeight = "bold"
38- bgGradient = { 'linear(to-b, green.500, blue.500)' }
37+ bgGradient = { text . Hero }
3938 bgClip = { 'text' }
4039 fontFamily = { 'monospace' }
4140 >
@@ -81,11 +80,7 @@ const Home = () => {
8180 flexDirection = "column"
8281 justifyContent = "center"
8382 marginTop = { 5 }
84- bgGradient = {
85- colorMode === 'light'
86- ? 'linear(to-r, green.200, blue.400)'
87- : 'linear(to-r, green.800, blue.900)'
88- }
83+ bgGradient = { gradient . contentBG }
8984 boxShadow = { 'lg' }
9085 padding = { '4' }
9186 borderRadius = { 'lg' }
@@ -101,11 +96,7 @@ const Home = () => {
10196 flexDirection = "column"
10297 justifyContent = "center"
10398 marginTop = { 5 }
104- bgGradient = {
105- colorMode === 'light'
106- ? 'linear(to-r, green.200, blue.400)'
107- : 'linear(to-r, green.800, blue.900)'
108- }
99+ bgGradient = { gradient . contentBG }
109100 boxShadow = { 'lg' }
110101 padding = { '4' }
111102 borderRadius = { 'lg' }
0 commit comments