File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
frontend/src/components/Nav Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import {
2121} from 'lib/paths' ;
2222import { useLocation } from 'react-router-dom' ;
2323import { useLocalStorage } from 'lib/hooks/useLocalStorage' ;
24+ import { ClusterColorKey } from 'theme/theme' ;
2425
2526interface ClusterMenuProps {
2627 name : Cluster [ 'name' ] ;
@@ -39,7 +40,7 @@ const ClusterMenu: FC<ClusterMenuProps> = ({
3940 features ?. includes ( key ) ;
4041 const [ isOpen , setIsOpen ] = useState ( ! ! singleMode ) ;
4142 const location = useLocation ( ) ;
42- const [ colorKey , setColorKey ] = useLocalStorage (
43+ const [ colorKey , setColorKey ] = useLocalStorage < ClusterColorKey > (
4344 `clusterColor-${ name } ` ,
4445 'transparent'
4546 ) ;
Original file line number Diff line number Diff line change 1- import React , { type FC } from 'react' ;
1+ import React , { Dispatch , type FC , SetStateAction } from 'react' ;
22import { ServerStatus } from 'generated-sources' ;
33import MenuColorPicker from 'components/Nav/Menu/MenuColorPicker/MenuColorPicker' ;
4+ import { ClusterColorKey } from 'theme/theme' ;
45
56import * as S from './styled' ;
67
@@ -9,7 +10,7 @@ export interface MenuTabProps {
910 status : ServerStatus ;
1011 isOpen : boolean ;
1112 toggleClusterMenu : ( ) => void ;
12- setColorKey : ( ) => void ;
13+ setColorKey : Dispatch < SetStateAction < ClusterColorKey > > ;
1314}
1415
1516const MenuTab : FC < MenuTabProps > = ( {
@@ -19,7 +20,7 @@ const MenuTab: FC<MenuTabProps> = ({
1920 isOpen,
2021 setColorKey,
2122} ) => (
22- < S . MenuItem $variant = "primary " onClick = { toggleClusterMenu } >
23+ < S . MenuItem $variant = "secondary " onClick = { toggleClusterMenu } >
2324 < S . ContentWrapper >
2425 < S . StatusIconWrapper >
2526 < S . StatusIcon status = { status } aria-label = "status" >
You can’t perform that action at this time.
0 commit comments