+ )
+}
diff --git a/components/Account/AccountManageOverlay.tsx b/src/components/Account/AccountManageOverlay.tsx
similarity index 75%
rename from components/Account/AccountManageOverlay.tsx
rename to src/components/Account/AccountManageOverlay.tsx
index d12a164d..184b3174 100644
--- a/components/Account/AccountManageOverlay.tsx
+++ b/src/components/Account/AccountManageOverlay.tsx
@@ -1,16 +1,9 @@
import { useEffect } from 'react'
-import Button from 'components/Button'
-import PlusIcon from 'components/Icons/add.svg'
-import ArrowDown from 'components/Icons/arrow-down.svg'
-import ArrowUp from 'components/Icons/arrow-up.svg'
-import ArrowsLeftRight from 'components/Icons/arrows-left-right.svg'
-import DeleteIcon from 'components/Icons/rubbish.svg'
-import Overlay from 'components/Overlay/Overlay'
-import OverlayAction from 'components/Overlay/OverlayLink'
-import Text from 'components/Text'
-import useCreateCreditAccount from 'hooks/mutations/useCreateCreditAccount'
-import useDeleteCreditAccount from 'hooks/mutations/useDeleteCreditAccount'
+import { Button, Text } from 'components'
+import { Add, ArrowDown, ArrowsLeftRight, ArrowUp, Rubbish } from 'components/Icons'
+import { Overlay, OverlayAction } from 'components/Overlay'
+import { useCreateCreditAccount, useDeleteCreditAccount } from 'hooks/mutations'
import { useAccountDetailsStore, useModalStore } from 'stores'
interface Props {
@@ -19,7 +12,7 @@ interface Props {
show: boolean
}
-const AccountManageOverlay = ({ className, setShow, show }: Props) => {
+export const AccountManageOverlay = ({ className, setShow, show }: Props) => {
const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount)
const { mutate: createCreditAccount, isLoading: isLoadingCreate } = useCreateCreditAccount()
@@ -73,13 +66,13 @@ const AccountManageOverlay = ({ className, setShow, show }: Props) => {
setShow={setShow}
text='Create New Account'
onClick={createCreditAccount}
- icon={}
+ icon={}
/>
}
+ icon={}
/>
{
)
}
-
-export default AccountManageOverlay
diff --git a/components/Account/AccountNavigation.tsx b/src/components/Account/AccountNavigation.tsx
similarity index 89%
rename from components/Account/AccountNavigation.tsx
rename to src/components/Account/AccountNavigation.tsx
index b89de187..df090627 100644
--- a/components/Account/AccountNavigation.tsx
+++ b/src/components/Account/AccountNavigation.tsx
@@ -1,12 +1,11 @@
import classNames from 'classnames'
import { useMemo, useState } from 'react'
-import Button from 'components/Button'
-import ChevronDownIcon from 'components/Icons/chevron-down.svg'
-import Overlay from 'components/Overlay/Overlay'
+import { Button } from 'components'
+import { ChevronDown } from 'components/Icons'
+import { Overlay } from 'components/Overlay'
import { useAccountDetailsStore } from 'stores'
-
-import AccountManageOverlay from './AccountManageOverlay'
+import { AccountManageOverlay } from 'components/Account'
interface Props {
creditAccountsList: string[]
@@ -15,7 +14,7 @@ interface Props {
const MAX_VISIBLE_CREDIT_ACCOUNTS = 5
-const AccountNavigation = ({ creditAccountsList, selectedAccount }: Props) => {
+export const AccountNavigation = ({ creditAccountsList, selectedAccount }: Props) => {
const { firstCreditAccounts, restCreditAccounts } = useMemo(() => {
return {
firstCreditAccounts: creditAccountsList?.slice(0, MAX_VISIBLE_CREDIT_ACCOUNTS) ?? [],
@@ -53,7 +52,7 @@ const AccountNavigation = ({ creditAccountsList, selectedAccount }: Props) => {
>
More
-
+
@@ -92,7 +91,7 @@ const AccountNavigation = ({ creditAccountsList, selectedAccount }: Props) => {
>
Manage
-
+
@@ -105,5 +104,3 @@ const AccountNavigation = ({ creditAccountsList, selectedAccount }: Props) => {
>
)
}
-
-export default AccountNavigation
diff --git a/components/Account/AccountStatus.tsx b/src/components/Account/AccountStatus.tsx
similarity index 85%
rename from components/Account/AccountStatus.tsx
rename to src/components/Account/AccountStatus.tsx
index e0a5522e..8770d622 100644
--- a/components/Account/AccountStatus.tsx
+++ b/src/components/Account/AccountStatus.tsx
@@ -1,19 +1,16 @@
import BigNumber from 'bignumber.js'
import { useEffect } from 'react'
+import { Button, FormattedNumber, Gauge, Text } from 'components'
import { BorrowCapacity } from 'components/BorrowCapacity'
-import Button from 'components/Button'
-import FormattedNumber from 'components/FormattedNumber'
-import Gauge from 'components/Gauge'
-import Text from 'components/Text'
-import useCreateCreditAccount from 'hooks/mutations/useCreateCreditAccount'
-import useAccountStats from 'hooks/useAccountStats'
-import useCreditAccounts from 'hooks/useCreditAccounts'
+import { useAccountStats } from 'hooks/data'
+import { useCreateCreditAccount } from 'hooks/mutations'
+import { useCreditAccounts } from 'hooks/queries'
import { useModalStore } from 'stores'
import { chain } from 'utils/chains'
import { formatValue } from 'utils/formatters'
-const AccountStatus = () => {
+export const AccountStatus = () => {
const accountStats = useAccountStats()
const { data: creditAccountsList } = useCreditAccounts()
const { mutate: createCreditAccount, isLoading: isLoadingCreate } = useCreateCreditAccount()
@@ -81,4 +78,3 @@ const AccountStatus = () => {
)
}
-export default AccountStatus
diff --git a/src/components/Account/ConfirmModal.tsx b/src/components/Account/ConfirmModal.tsx
new file mode 100644
index 00000000..2be37333
--- /dev/null
+++ b/src/components/Account/ConfirmModal.tsx
@@ -0,0 +1,36 @@
+import classNames from 'classnames'
+
+import { CircularProgress, Modal, Text } from 'components'
+import { MarsProtocol } from 'components/Icons'
+import { useModalStore } from 'stores'
+
+export const ConfirmModal = () => {
+ const createOpen = useModalStore((s) => s.createAccountModal)
+ const deleteOpen = useModalStore((s) => s.deleteAccountModal)
+
+ return (
+
+
+
+
+
+
+
+ {createOpen &&
+ 'A small step for a Smart Contracts but a big leap for your financial freedom.'}
+ {deleteOpen && 'Some rovers have to be recycled once in a while...'}
+
+
+
+
+
+
+
+ )
+}
diff --git a/components/Account/FundAccountModal.tsx b/src/components/Account/FundAccountModal.tsx
similarity index 92%
rename from components/Account/FundAccountModal.tsx
rename to src/components/Account/FundAccountModal.tsx
index e3772bb6..f42da491 100644
--- a/components/Account/FundAccountModal.tsx
+++ b/src/components/Account/FundAccountModal.tsx
@@ -4,19 +4,14 @@ import { useEffect, useMemo, useState } from 'react'
import { toast } from 'react-toastify'
import useLocalStorageState from 'use-local-storage-state'
-import Button from 'components/Button'
-import CircularProgress from 'components/CircularProgress'
-import MarsProtocolLogo from 'components/Icons/mars-protocol.svg'
-import Modal from 'components/Modal'
-import Slider from 'components/Slider'
-import Text from 'components/Text'
-import useDepositCreditAccount from 'hooks/mutations/useDepositCreditAccount'
-import useAllBalances from 'hooks/useAllBalances'
-import useAllowedCoins from 'hooks/useAllowedCoins'
+import { Button, CircularProgress, Modal, Slider, Text } from 'components'
+import { MarsProtocol } from 'components/Icons'
+import { useDepositCreditAccount } from 'hooks/mutations'
+import { useAllBalances, useAllowedCoins } from 'hooks/queries'
import { useAccountDetailsStore, useModalStore } from 'stores'
import { getTokenDecimals, getTokenSymbol } from 'utils/tokens'
-const FundAccountModal = () => {
+export const FundAccountModal = () => {
// ---------------
// STORE
// ---------------
@@ -105,7 +100,7 @@ const FundAccountModal = () => {