1- import AccessTimeIcon from '@mui/icons-material/AccessTime' ;
2- import { Box , Grid , Link as MuiLink , Typography } from '@mui/material' ;
31import { useEffect , useState } from 'react' ;
42import { useTranslation } from 'react-i18next' ;
3+ import AccessTimeIcon from '@mui/icons-material/AccessTime' ;
4+ import { Box , Grid , Link as MuiLink , Typography } from '@mui/material' ;
5+
56import { env } from '@/shared/env' ;
6- import { useColorMode } from '@/shared/contexts/color-mode' ;
77import { useProposalQuery } from '../hooks/use-proposal-query' ;
88import { formatCountdown } from '../../../shared/utils/time' ;
99import { type ProposalResponse } from '../services/governance.service' ;
@@ -20,8 +20,6 @@ function getProposalStatus(proposal: ProposalResponse): ProposalStatus {
2020export function GovernanceBanner ( ) {
2121 const { t } = useTranslation ( ) ;
2222 const { data : proposal , isLoading, isError } = useProposalQuery ( ) ;
23- const { colorPalette } = useColorMode ( ) ;
24- const { text, background } = colorPalette . banner ;
2523 const [ timeRemaining , setTimeRemaining ] = useState ( '00:00:00' ) ;
2624
2725 useEffect ( ( ) => {
@@ -55,8 +53,8 @@ export function GovernanceBanner() {
5553 sx = { {
5654 alignItems : { xs : 'flex-start' , sm : 'center' } ,
5755 justifyContent : { xs : 'flex-start' , sm : 'space-between' } ,
58- bgcolor : background . primary ,
59- color : text . secondary ,
56+ bgcolor : ' primary.main' ,
57+ color : 'common.white' ,
6058 borderRadius : '8px' ,
6159 p : 2 ,
6260 gap : 2 ,
@@ -75,13 +73,13 @@ export function GovernanceBanner() {
7573 >
7674 < Box sx = { { display : 'flex' , alignItems : 'center' } } >
7775 < AccessTimeIcon sx = { { mr : 1 } } />
78- < Typography variant = "body2" sx = { { color : text . secondary } } >
76+ < Typography variant = "body2" sx = { { color : 'common.white' } } >
7977 { status === 'pending'
8078 ? t ( 'governance.timeToStart' , 'Voting starts in' )
8179 : t ( 'governance.timeToReveal' , 'Time to reveal vote' ) }
8280 :
8381 </ Typography >
84- < Typography variant = "body1" sx = { { ml : 1 , color : text . primary } } >
82+ < Typography variant = "body1" sx = { { ml : 1 , color : ' text.primary' } } >
8583 { timeRemaining }
8684 </ Typography >
8785 </ Box >
@@ -90,8 +88,8 @@ export function GovernanceBanner() {
9088 variant = "body1"
9189 sx = { {
9290 ml : { xs : 0 , md : 8 } ,
93- color : text . primary ,
94- bgcolor : background . secondary ,
91+ color : ' text.primary' ,
92+ bgcolor : ' background.paper' ,
9593 borderRadius : '8px' ,
9694 p : '4px 8px' ,
9795 } }
@@ -113,9 +111,9 @@ export function GovernanceBanner() {
113111 href = { env . VITE_GOVERNANCE_URL }
114112 target = "_blank"
115113 rel = "noopener noreferrer"
114+ variant = "body1"
116115 sx = { {
117- color : text . secondary ,
118- fontWeight : 500 ,
116+ color : 'common.white' ,
119117 textDecoration : 'none' ,
120118 '&:hover' : {
121119 textDecoration : 'underline' ,
0 commit comments