fix: use MAC constant instead of string
This commit is contained in:
parent
d8793c48b1
commit
3e1fe715e3
|
@ -31,6 +31,7 @@ export const KEYSTORE_FILES = 'KeystoreFiles'
|
|||
export const RECOVERY_PHRASE = 'Recovery Phrase'
|
||||
export const BOTH_KEY_AND_RECOVERY = 'Both KeystoreFiles & Recovery Phrase'
|
||||
export const ETH_PER_VALIDATOR = 32
|
||||
|
||||
export const MAC = 'Mac'
|
||||
export const WINDOWS = 'Windows'
|
||||
export const LINUX = 'Linux'
|
||||
|
|
|
@ -2,18 +2,18 @@ import { XStack } from 'tamagui'
|
|||
import { useState } from 'react'
|
||||
|
||||
import OSCard from './OSCard'
|
||||
import { LINUX, WINDOWS } from '../../../../constants'
|
||||
import { LINUX, MAC, WINDOWS } from '../../../../constants'
|
||||
|
||||
const OSCards = () => {
|
||||
const [selectedOs, setSelectedOs] = useState('MAC')
|
||||
const [selectedOs, setSelectedOs] = useState(MAC)
|
||||
|
||||
return (
|
||||
<XStack justifyContent={'space-between'} my={'15px'}>
|
||||
<OSCard
|
||||
icon="/icons/apple-logo.svg"
|
||||
name="MacOS"
|
||||
isSelected={selectedOs === 'MAC'}
|
||||
onClick={() => setSelectedOs('MAC')}
|
||||
isSelected={selectedOs === MAC}
|
||||
onClick={() => setSelectedOs(MAC)}
|
||||
/>
|
||||
<OSCard
|
||||
icon="/icons/linux-logo.svg"
|
||||
|
|
|
@ -14,7 +14,7 @@ type Story = StoryObj<typeof meta>
|
|||
export const Default: Story = {
|
||||
args: {
|
||||
icon: '/icons/apple-logo.svg',
|
||||
name: 'MAC',
|
||||
name: MAC,
|
||||
isSelected: true,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -6,11 +6,11 @@ import { useSelector } from 'react-redux'
|
|||
|
||||
import SyntaxHighlighterBox from './SyntaxHighlighter'
|
||||
import { RootState } from '../../../../redux/store'
|
||||
import { LINUX, WINDOWS } from '../../../../constants'
|
||||
import { LINUX, MAC, WINDOWS } from '../../../../constants'
|
||||
import OSCard from './OSCard'
|
||||
|
||||
const ValidatorSetupInstall = () => {
|
||||
const [selectedOs, setSelectedOs] = useState('MAC')
|
||||
const [selectedOs, setSelectedOs] = useState(MAC)
|
||||
const selectedClient = useSelector((state: RootState) => state.execClient.selectedClient)
|
||||
|
||||
return (
|
||||
|
@ -60,8 +60,8 @@ const ValidatorSetupInstall = () => {
|
|||
<OSCard
|
||||
icon="/icons/apple-logo.svg"
|
||||
name="MacOS"
|
||||
isSelected={selectedOs === 'MAC'}
|
||||
onClick={() => setSelectedOs('MAC')}
|
||||
isSelected={selectedOs === MAC}
|
||||
onClick={() => setSelectedOs(MAC)}
|
||||
/>
|
||||
<OSCard
|
||||
icon="/icons/linux-logo.svg"
|
||||
|
|
Loading…
Reference in New Issue