Skip to content

Commit 15cae6a

Browse files
author
Leshe4ka
committed
TS fixes
1 parent ac96ee8 commit 15cae6a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

frontend/src/components/Nav/ClusterMenu/ClusterMenu.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
} from 'lib/paths';
2222
import { useLocation } from 'react-router-dom';
2323
import { useLocalStorage } from 'lib/hooks/useLocalStorage';
24+
import { ClusterColorKey } from 'theme/theme';
2425

2526
interface 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
);

frontend/src/components/Nav/Menu/MenuTab.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import React, { type FC } from 'react';
1+
import React, { Dispatch, type FC, SetStateAction } from 'react';
22
import { ServerStatus } from 'generated-sources';
33
import MenuColorPicker from 'components/Nav/Menu/MenuColorPicker/MenuColorPicker';
4+
import { ClusterColorKey } from 'theme/theme';
45

56
import * 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

1516
const 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">

0 commit comments

Comments
 (0)