diff --git a/src/components/AppBar.js b/src/components/AppBar.js
index d7dab56..e2ef88f 100644
--- a/src/components/AppBar.js
+++ b/src/components/AppBar.js
@@ -6,7 +6,7 @@ import {
} from '@chakra-ui/react'
import { FiMenu, FiCircle } from 'react-icons/fi'
import { Logo } from './Logo'
-import { ColorModeSwitcher } from './ColorModeSwitcher'
+import { ColorModeSwitcher } from './base'
import { config } from '../config'
import { useApp } from '../AppContext'
import { AlertBox } from './alert'
diff --git a/src/components/BottomNav.js b/src/components/BottomNav.js
index 795d3f0..46079a4 100644
--- a/src/components/BottomNav.js
+++ b/src/components/BottomNav.js
@@ -1,4 +1,4 @@
-import { ChakraBottomNav, ChakraBottomNavItem } from './ChakraBottomNav'
+import { ChakraBottomNav, ChakraBottomNavItem } from './base'
import { useApp } from '../AppContext'
export const BottomNav = (props) => {
diff --git a/src/components/SideBar.js b/src/components/SideBar.js
index 8e30fc4..98618d2 100644
--- a/src/components/SideBar.js
+++ b/src/components/SideBar.js
@@ -2,12 +2,11 @@ import {
Box, CloseButton, Flex, Icon, useColorModeValue,
Stack,
} from '@chakra-ui/react'
-import { FiArrowRight, FiHome, FiTrendingUp, FiLock } from 'react-icons/fi'
+import { FiArrowRight } from 'react-icons/fi'
import { useApp } from '../AppContext'
import { Logo } from './Logo'
-import { ColorModeSwitcher } from './ColorModeSwitcher'
+import { ColorModeSwitcher } from './base'
import { Link } from 'react-router-dom'
-import { useTranslation } from 'react-i18next'
import { Lang } from './Lang'
import { supportedLangs } from '../i18'
@@ -71,7 +70,6 @@ export const SideBar = ({ onCloseDrawer, ...rest }) => {
const app = useApp()
const bg = useColorModeValue('white', 'gray.900')
- const { t } = useTranslation()
// const colorBorderRight = useColorModeValue('gray.200', 'gray.700')
return (
diff --git a/src/components/StakingCoinCard.js b/src/components/StakingCoinCard.js
index beb3dee..6cde1e5 100644
--- a/src/components/StakingCoinCard.js
+++ b/src/components/StakingCoinCard.js
@@ -1,252 +1,10 @@
import React from "react"
import {
VStack, Image, Text, Stack, HStack,
- Button, Tag, Box,
- useColorModeValue, Badge, Divider, Icon,
+ Button, useColorModeValue, Badge, Divider,
} from "@chakra-ui/react"
import { StateCard } from './NumCard'
import { useTranslation } from 'react-i18next'
-import { ModalBox } from "./alert"
-import { CardRow } from './FarmCoinCard'
-import { FiLock, FiUnlock } from "react-icons/fi"
-import { HBetween, HFStack, VFStack } from "./base"
-import { config } from "../config"
-
-/**
- * Special Modal Box, Why not ask who is your daddy ???
- */
-export const StakingModalStrategy = ({ isOpen, onClose,
- icon, symbol, amount, percentage, address,
- nodesStaked, nodesNominations, share, status,
- plans,
-}) => {
-
- const { t } = useTranslation()
-
- return (
-
-
- {/* title */}
-
-
-
-
- {symbol}
-
-
-
-
- {amount}
-
-
-
- {t('staked')}
-
-
-
-
- {/* tips */}
-
-
- {t('nodeNominations')}
-
-
-
- {/* body */}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {t('duration')}
- {t('hashrate')}
- {t('apy')}
-
-
- {
- plans && plans.map((p, index) => (
-
- {p.days}
- {p.min + '~' + p.max}
-
- {p.interest + '%'}
-
-
- ))
- }
-
-
-
- )
-}
-
-export const StakingModalCertificate = ({ isOpen, onClose, onConfirm,
- index, coin, assets, income }) => {
- const { t } = useTranslation()
-
- const Row2Text = ({ row1, row2 }) => {
-
- return (
-
-
- {row1}
-
-
- {row2}
-
-
- )
- }
-
- return (
- { onConfirm(index) }}
- >
-
- {/* title */}
-
-
-
-
- {coin?.name}
-
-
-
-
- {t('assets') + ' ' + assets}
-
-
-
-
- {/* tag */}
-
-
- {t('current')}
-
-
-
-
-
- {t('apy')}
-
-
-
- {
- coin?.conf.plans[0].interest + '% ~' +
- coin?.conf.plans[coin?.conf.plans.length - 1].interest + '%'
- }
-
-
-
-
- {/* progressing */}
-
-
-
-
-
-
-
- {/* intro */}
-
-
-
-
-
-
-
-
-
-
- {t('income')}
- {income}
-
-
-
- )
-}
export const StakingCoinCard = ({
symbol, icon, index,
diff --git a/src/components/alert/AlertBox.js b/src/components/alert/AlertBox.js
index 0631e7a..dcdadce 100644
--- a/src/components/alert/AlertBox.js
+++ b/src/components/alert/AlertBox.js
@@ -6,8 +6,13 @@ import {
AlertDialogBody, AlertDialogFooter
} from '@chakra-ui/react'
-export const AlertBox = ({ isOpen, onClose, title, children,
- showCancel = false, cancelText = 'Cancel', showOk = true, okText = 'OK' }) => {
+
+export const AlertBox = ({
+ isOpen, onClose, title, children,
+ showFooter = true,
+ showCancel = false, textCancel = 'Cancel',
+ showConfirm = true, textConfirm = 'OK'
+}) => {
const cancelRef = React.useRef()
@@ -28,13 +33,13 @@ export const AlertBox = ({ isOpen, onClose, title, children,
{children}
-
+
{
- showCancel &&
+ showCancel &&
}
{
- showOk &&