1
1
'use client'
2
2
3
- import { useColorMode } from '@chakra-ui/react'
4
3
import { ArrowPathIcon } from '@heroicons/react/20/solid'
5
4
import { getTokenByChainAndAddress } from '@indexcoop/tokenlists'
6
5
import { AnimatePresence , motion } from 'framer-motion'
@@ -17,7 +16,6 @@ import { formatAmount, formatDollarAmount } from '@/lib/utils'
17
16
export default function Page ( ) {
18
17
const { address : queryProductAddress } = useParams ( )
19
18
const { products, onSelectIndexToken } = useEarnContext ( )
20
- const { colorMode, toggleColorMode } = useColorMode ( )
21
19
22
20
const selectedProduct = products . find (
23
21
( p ) => p . tokenAddress === queryProductAddress ,
@@ -34,18 +32,6 @@ export default function Page() {
34
32
}
35
33
} , [ selectedProduct , onSelectIndexToken ] )
36
34
37
- useEffect ( ( ) => {
38
- if ( colorMode === 'light' ) {
39
- toggleColorMode ( )
40
- }
41
-
42
- return ( ) => {
43
- if ( colorMode === 'dark' ) {
44
- toggleColorMode ( )
45
- }
46
- }
47
- } , [ colorMode , toggleColorMode ] )
48
-
49
35
useEffect ( ( ) => {
50
36
document . body . classList . add ( 'dark' , 'bg-ic-black' )
51
37
return ( ) => {
@@ -61,7 +47,7 @@ export default function Page() {
61
47
< motion . div className = 'flex w-full flex-wrap gap-6 rounded-3xl border border-gray-600 border-opacity-[0.8] bg-zinc-900 p-6 md:flex-nowrap' >
62
48
< div className = 'flex w-full flex-col gap-8' >
63
49
< div className = 'flex flex-col gap-6' >
64
- < h3 className = 'text-xl font-medium' >
50
+ < h3 className = 'text-xl font-medium text-neutral-50 ' >
65
51
{ selectedProduct . name }
66
52
</ h3 >
67
53
< p className = 'text-xs font-medium leading-5 text-neutral-400' >
0 commit comments