mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-28 02:50:45 +00:00
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 ConfirmRecoveryPhrase from './pages/ValidatorOnboarding/KeyGeneration/ConfirmRecoveryPhrase/ConfirmRecoveryPhrase'
|
||||||
import Deposit from './pages/ValidatorOnboarding/Deposit/Deposit'
|
import Deposit from './pages/ValidatorOnboarding/Deposit/Deposit'
|
||||||
import DeviceHealthCheck from './pages/DeviceHealthCheck/DeviceHealthCheck'
|
import DeviceHealthCheck from './pages/DeviceHealthCheck/DeviceHealthCheck'
|
||||||
import ExitPanel from './pages/ManageValidator/RightManage/Panels/ExitPanel'
|
import ExitPanel from './pages/ManageValidator/RightManagePanels/ExitPanel'
|
||||||
import MigratePanel from './pages/ManageValidator/RightManage/Panels/MigratePanel'
|
import MigratePanel from './pages/ManageValidator/RightManagePanels/MigratePanel'
|
||||||
import DepositPanel from './pages/ManageValidator/RightManage/Panels/DepositPanel'
|
import DepositPanel from './pages/ManageValidator/RightManagePanels/DepositPanel'
|
||||||
|
import DefaultPanel from './pages/ManageValidator/RightManagePanels/DefaultPanel'
|
||||||
|
|
||||||
const injected = injectedModule()
|
const injected = injectedModule()
|
||||||
const walletConnect = walletConnectModule(wcV2InitOptions)
|
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 { Text } from '@status-im/components'
|
||||||
import { YStack } from 'tamagui'
|
import { YStack } from 'tamagui'
|
||||||
|
|
||||||
import Icon from '../../../../components/General/Icon'
|
import Icon from '../../../components/General/Icon'
|
||||||
|
|
||||||
const DefaultPanel = () => {
|
const DefaultPanel = () => {
|
||||||
return (
|
return (
|
@ -3,13 +3,13 @@ import { YStack } from 'tamagui'
|
|||||||
import { useSelector } from 'react-redux'
|
import { useSelector } from 'react-redux'
|
||||||
|
|
||||||
import PanelWrapper from './PanelWrapper'
|
import PanelWrapper from './PanelWrapper'
|
||||||
import { getDepositTitle } from '../../../../utilities'
|
import { getDepositTitle } from '../../../utilities'
|
||||||
import { RootState } from '../../../../redux/store'
|
import { RootState } from '../../../redux/store'
|
||||||
import ConnectedWallet from '../../../../components/General/ConnectedWallet'
|
import ConnectedWallet from '../../../components/General/ConnectedWallet'
|
||||||
import ConnectWallet from '../../../../components/General/ConnectWallet'
|
import ConnectWallet from '../../../components/General/ConnectWallet'
|
||||||
import ChainParity from '../../../../components/General/ChainParity'
|
import ChainParity from '../../../components/General/ChainParity'
|
||||||
import ValidatorRequest from '../../../../components/General/ValidatorRequest/ValidatorRequest'
|
import ValidatorRequest from '../../../components/General/ValidatorRequest/ValidatorRequest'
|
||||||
import ValidatorBalanceInfoBox from '../../../../components/General/ValidatorBalanceInfoBox'
|
import ValidatorBalanceInfoBox from '../../../components/General/ValidatorBalanceInfoBox'
|
||||||
import DepositValidator from './DepositValidator'
|
import DepositValidator from './DepositValidator'
|
||||||
|
|
||||||
const DepositPanel = () => {
|
const DepositPanel = () => {
|
@ -3,7 +3,7 @@ import { ClearIcon } from '@status-im/icons'
|
|||||||
import { XStack, YStack } from 'tamagui'
|
import { XStack, YStack } from 'tamagui'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
|
|
||||||
import CurrencyDropdown from '../../../../components/General/CurrencyDropdown'
|
import CurrencyDropdown from '../../../components/General/CurrencyDropdown'
|
||||||
|
|
||||||
const DepositValidator = () => {
|
const DepositValidator = () => {
|
||||||
const [depositAmount, setDepositAmount] = useState('')
|
const [depositAmount, setDepositAmount] = useState('')
|
@ -3,7 +3,7 @@ import { CloseCircleIcon } from '@status-im/icons'
|
|||||||
import { XStack, YStack } from 'tamagui'
|
import { XStack, YStack } from 'tamagui'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
|
|
||||||
import KeystoreBackupsCard from '../../../../components/General/KeystoreBackupsCard'
|
import KeystoreBackupsCard from '../../../components/General/KeystoreBackupsCard'
|
||||||
import PanelWrapper from './PanelWrapper'
|
import PanelWrapper from './PanelWrapper'
|
||||||
|
|
||||||
const MigratePanel = () => {
|
const MigratePanel = () => {
|
Loading…
x
Reference in New Issue
Block a user