mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-18 14:26:39 +00:00
fix: change tabs constant name
This commit is contained in:
parent
70b66834af
commit
7e7083aaa9
@ -61,7 +61,7 @@ export const years = [
|
||||
]
|
||||
|
||||
// Validator Management
|
||||
export const VALIDATOR_TABS = ['Active', 'Pending', 'Inactive', 'Exited', 'Withdraw', 'All']
|
||||
export const VALIDATOR_TABS_MANAGEMENT = ['Active', 'Pending', 'Inactive', 'Exited', 'Withdraw', 'All']
|
||||
|
||||
export const VALIDATORS_DATA = [
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react'
|
||||
|
||||
import ManagementTable from './ManagementTable'
|
||||
import { VALIDATOR_TABS } from '../../../constants'
|
||||
import { VALIDATOR_TABS_MANAGEMENT } from '../../../constants'
|
||||
import { useState } from 'react'
|
||||
|
||||
const meta = {
|
||||
@ -25,7 +25,7 @@ export const Default: Story = () => {
|
||||
|
||||
return (
|
||||
<ManagementTable
|
||||
tab={VALIDATOR_TABS[0]}
|
||||
tab={VALIDATOR_TABS_MANAGEMENT[0]}
|
||||
searchValue={searchValue}
|
||||
changeSearchValue={changeSearchValue}
|
||||
/>
|
||||
@ -33,7 +33,7 @@ export const Default: Story = () => {
|
||||
}
|
||||
|
||||
Default.args = {
|
||||
tab: VALIDATOR_TABS[0],
|
||||
tab: VALIDATOR_TABS_MANAGEMENT[0],
|
||||
searchValue: '',
|
||||
changeSearchValue: () => {},
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import { YStack, XStack, Stack } from 'tamagui'
|
||||
|
||||
import ValidatorProfile from '../../../components/General/ValidatorProfile'
|
||||
import SearchManagement from './SearchManagement'
|
||||
import { VALIDATORS_DATA, VALIDATOR_TABS } from '../../../constants'
|
||||
import { VALIDATORS_DATA, VALIDATOR_TABS_MANAGEMENT } from '../../../constants'
|
||||
import './ManagementTable.css'
|
||||
|
||||
type ManagementTableProps = {
|
||||
@ -26,7 +26,7 @@ type Validator = {
|
||||
}
|
||||
|
||||
const isValidStatus = (validatorStatus: string, tabStatus: string) => {
|
||||
if (validatorStatus === tabStatus || tabStatus === VALIDATOR_TABS[VALIDATOR_TABS.length - 1]) {
|
||||
if (validatorStatus === tabStatus || tabStatus === VALIDATOR_TABS_MANAGEMENT[VALIDATOR_TABS_MANAGEMENT.length - 1]) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
@ -3,7 +3,7 @@ import { Stack } from 'tamagui'
|
||||
import { useState } from 'react'
|
||||
|
||||
import ManagementTable from './ManagementTable/ManagementTable'
|
||||
import { VALIDATOR_TABS } from '../../constants'
|
||||
import { VALIDATOR_TABS_MANAGEMENT } from '../../constants'
|
||||
|
||||
const ManagementTabs = () => {
|
||||
const [searchValue, setSearchValue] = useState('')
|
||||
@ -14,17 +14,17 @@ const ManagementTabs = () => {
|
||||
|
||||
return (
|
||||
<div style={{ width: '100%' }}>
|
||||
<Tabs defaultValue={VALIDATOR_TABS[0]}>
|
||||
<Tabs defaultValue={VALIDATOR_TABS_MANAGEMENT[0]}>
|
||||
<Stack style={{ cursor: 'pointer', width: 'fit-content', margin: '16px 0' }}>
|
||||
<Tabs.List size={32}>
|
||||
{VALIDATOR_TABS.map(tab => (
|
||||
{VALIDATOR_TABS_MANAGEMENT.map(tab => (
|
||||
<Tabs.Trigger key={tab} type="default" value={tab}>
|
||||
{tab}
|
||||
</Tabs.Trigger>
|
||||
))}
|
||||
</Tabs.List>
|
||||
</Stack>
|
||||
{VALIDATOR_TABS.map(tab => (
|
||||
{VALIDATOR_TABS_MANAGEMENT.map(tab => (
|
||||
<Tabs.Content key={tab} value={tab} style={{ marginTop: '8px' }}>
|
||||
<ManagementTable
|
||||
tab={tab}
|
||||
|
Loading…
x
Reference in New Issue
Block a user