feat(right-manage): remove general file and separate panels
This commit is contained in:
parent
3b5cc65abe
commit
cefbe28df7
|
@ -35,9 +35,10 @@ import Activation from './pages/ValidatorOnboarding/Activation/Activation'
|
|||
import ConfirmRecoveryPhrase from './pages/ValidatorOnboarding/KeyGeneration/ConfirmRecoveryPhrase/ConfirmRecoveryPhrase'
|
||||
import Deposit from './pages/ValidatorOnboarding/Deposit/Deposit'
|
||||
import DeviceHealthCheck from './pages/DeviceHealthCheck/DeviceHealthCheck'
|
||||
import ExitPanel from './pages/ManageValidator/RightManage/Panels/ExitPanel'
|
||||
import MigratePanel from './pages/ManageValidator/RightManage/Panels/MigratePanel'
|
||||
import DepositPanel from './pages/ManageValidator/RightManage/Panels/DepositPanel'
|
||||
import ExitPanel from './pages/ManageValidator/RightManagePanels/ExitPanel'
|
||||
import MigratePanel from './pages/ManageValidator/RightManagePanels/MigratePanel'
|
||||
import DepositPanel from './pages/ManageValidator/RightManagePanels/DepositPanel'
|
||||
import DefaultPanel from './pages/ManageValidator/RightManagePanels/DefaultPanel'
|
||||
|
||||
const injected = injectedModule()
|
||||
const walletConnect = walletConnectModule(wcV2InitOptions)
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
import DefaultPanel from './Panels/DefaultPanel'
|
||||
import DepositPanel from './Panels/DepositPanel'
|
||||
import ExitPanel from './Panels/ExitPanel'
|
||||
import MigratePanel from './Panels/MigratePanel'
|
||||
|
||||
const RightManage = () => {
|
||||
const lastUrlSegment = window.location.pathname.split('/').pop()
|
||||
|
||||
const getPanel = () => {
|
||||
switch (lastUrlSegment) {
|
||||
case 'migrate':
|
||||
return <MigratePanel />
|
||||
case 'deposit':
|
||||
return <DepositPanel />
|
||||
case 'exit':
|
||||
return <ExitPanel />
|
||||
default:
|
||||
return <DefaultPanel />
|
||||
}
|
||||
}
|
||||
|
||||
return <div style={{ flexGrow: 1 }}>{getPanel()}</div>
|
||||
}
|
||||
|
||||
export default RightManage
|
|
@ -1,7 +1,7 @@
|
|||
import { Text } from '@status-im/components'
|
||||
import { YStack } from 'tamagui'
|
||||
|
||||
import Icon from '../../../../components/General/Icon'
|
||||
import Icon from '../../../components/General/Icon'
|
||||
|
||||
const DefaultPanel = () => {
|
||||
return (
|
|
@ -3,13 +3,13 @@ import { YStack } from 'tamagui'
|
|||
import { useSelector } from 'react-redux'
|
||||
|
||||
import PanelWrapper from './PanelWrapper'
|
||||
import { getDepositTitle } from '../../../../utilities'
|
||||
import { RootState } from '../../../../redux/store'
|
||||
import ConnectedWallet from '../../../../components/General/ConnectedWallet'
|
||||
import ConnectWallet from '../../../../components/General/ConnectWallet'
|
||||
import ChainParity from '../../../../components/General/ChainParity'
|
||||
import ValidatorRequest from '../../../../components/General/ValidatorRequest/ValidatorRequest'
|
||||
import ValidatorBalanceInfoBox from '../../../../components/General/ValidatorBalanceInfoBox'
|
||||
import { getDepositTitle } from '../../../utilities'
|
||||
import { RootState } from '../../../redux/store'
|
||||
import ConnectedWallet from '../../../components/General/ConnectedWallet'
|
||||
import ConnectWallet from '../../../components/General/ConnectWallet'
|
||||
import ChainParity from '../../../components/General/ChainParity'
|
||||
import ValidatorRequest from '../../../components/General/ValidatorRequest/ValidatorRequest'
|
||||
import ValidatorBalanceInfoBox from '../../../components/General/ValidatorBalanceInfoBox'
|
||||
import DepositValidator from './DepositValidator'
|
||||
|
||||
const DepositPanel = () => {
|
|
@ -3,7 +3,7 @@ import { ClearIcon } from '@status-im/icons'
|
|||
import { XStack, YStack } from 'tamagui'
|
||||
import { useState } from 'react'
|
||||
|
||||
import CurrencyDropdown from '../../../../components/General/CurrencyDropdown'
|
||||
import CurrencyDropdown from '../../../components/General/CurrencyDropdown'
|
||||
|
||||
const DepositValidator = () => {
|
||||
const [depositAmount, setDepositAmount] = useState('')
|
|
@ -3,7 +3,7 @@ import { CloseCircleIcon } from '@status-im/icons'
|
|||
import { XStack, YStack } from 'tamagui'
|
||||
import { useState } from 'react'
|
||||
|
||||
import KeystoreBackupsCard from '../../../../components/General/KeystoreBackupsCard'
|
||||
import KeystoreBackupsCard from '../../../components/General/KeystoreBackupsCard'
|
||||
import PanelWrapper from './PanelWrapper'
|
||||
|
||||
const MigratePanel = () => {
|
Loading…
Reference in New Issue