{content.pool.remove.output.titleOut} minimum
-
+
{/*
{content.pool.remove.output.titleIn}
@@ -237,11 +228,11 @@ export default function Remove({
!isAssetNetwork ||
amountPercent === '0' ||
amountOcean === '0' ||
- poolTokens === '0'
+ poolInfo?.totalPoolTokens === '0'
}
txId={txId}
- tokenAddress={tokenOutAddress}
- tokenSymbol={tokenOutSymbol}
+ tokenAddress={poolInfo?.baseTokenAddress}
+ tokenSymbol={poolInfo?.baseTokenSymbol}
/>
)
diff --git a/src/components/Asset/AssetActions/Pool/Section/Title.module.css b/src/components/Asset/AssetActions/Pool/Section/Title.module.css
new file mode 100644
index 000000000..a376e0183
--- /dev/null
+++ b/src/components/Asset/AssetActions/Pool/Section/Title.module.css
@@ -0,0 +1,13 @@
+.title {
+ font-size: var(--font-size-base);
+ margin-bottom: calc(var(--spacer) / 3);
+ color: var(--color-secondary);
+}
+
+.titlePostfix {
+ font-size: var(--font-size-mini);
+ font-family: var(--font-family-base);
+ font-weight: var(--font-weight-base);
+ display: inline-block;
+ margin-left: 0.3rem;
+}
diff --git a/src/components/Asset/AssetActions/Pool/Section/Title.tsx b/src/components/Asset/AssetActions/Pool/Section/Title.tsx
new file mode 100644
index 000000000..67ddbe713
--- /dev/null
+++ b/src/components/Asset/AssetActions/Pool/Section/Title.tsx
@@ -0,0 +1,26 @@
+import Tooltip from '@shared/atoms/Tooltip'
+import React from 'react'
+import styles from './Title.module.css'
+
+export default function Title({
+ title,
+ tooltip,
+ titlePostfix,
+ titlePostfixTitle
+}: {
+ title: string
+ tooltip?: string
+ titlePostfix?: string
+ titlePostfixTitle?: string
+}) {
+ return (
+
+ {title} {tooltip && }{' '}
+ {titlePostfix && (
+
+ {titlePostfix}
+
+ )}
+
+ )
+}
diff --git a/src/components/Asset/AssetActions/Pool/Section/index.module.css b/src/components/Asset/AssetActions/Pool/Section/index.module.css
new file mode 100644
index 000000000..1bca7a276
--- /dev/null
+++ b/src/components/Asset/AssetActions/Pool/Section/index.module.css
@@ -0,0 +1,39 @@
+.container {
+ margin-left: calc(-1 * var(--spacer) / 1.5);
+ margin-right: calc(-1 * var(--spacer) / 1.5);
+ padding: calc(var(--spacer) / 1.5) calc(var(--spacer) / 1.5)
+ calc(var(--spacer) / 2) calc(var(--spacer) / 1.5);
+}
+
+@media (min-width: 40rem) {
+ .container {
+ padding-left: var(--spacer);
+ padding-right: var(--spacer);
+ margin-left: calc(-1 * var(--spacer));
+ margin-right: calc(-1 * var(--spacer));
+ }
+}
+
+.section {
+ composes: container;
+
+ border-top: 1px solid var(--border-color);
+ position: relative;
+}
+
+.section.highlight {
+ background: var(--background-highlight);
+}
+
+.section:first-child {
+ padding-top: 0;
+ border-top: 0;
+}
+
+.grid {
+ display: grid;
+ gap: calc(var(--spacer) / 2);
+ grid-template-columns:
+ [full-start] minmax(13rem, 1fr) [break] minmax(7rem, 1fr)
+ [full-end];
+}
diff --git a/src/components/Asset/AssetActions/Pool/Section/index.tsx b/src/components/Asset/AssetActions/Pool/Section/index.tsx
new file mode 100644
index 000000000..dac852fb8
--- /dev/null
+++ b/src/components/Asset/AssetActions/Pool/Section/index.tsx
@@ -0,0 +1,39 @@
+import React, { ReactElement, ReactNode } from 'react'
+import styles from './index.module.css'
+import Title from './Title'
+
+export default function PoolSection({
+ title,
+ tooltip,
+ titlePostfix,
+ titlePostfixTitle,
+ children,
+ highlight,
+ className
+}: {
+ title?: string
+ children: ReactNode
+ tooltip?: string
+ titlePostfix?: string
+ titlePostfixTitle?: string
+ highlight?: boolean
+ className?: string
+}): ReactElement {
+ return (
+
+ {title && (
+
+ )}
+
{children}
+
+ )
+}
diff --git a/src/components/Asset/AssetActions/Pool/Sections/Update.module.css b/src/components/Asset/AssetActions/Pool/Sections/Update.module.css
new file mode 100644
index 000000000..c45589126
--- /dev/null
+++ b/src/components/Asset/AssetActions/Pool/Sections/Update.module.css
@@ -0,0 +1,32 @@
+.update {
+ font-size: var(--font-size-mini);
+ color: var(--color-secondary);
+ text-align: center;
+ padding-top: calc(var(--spacer) / 4);
+ padding-bottom: calc(var(--spacer) / 3);
+}
+
+/* .update:before {
+ content: '';
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ display: inline-block;
+ border: 1px solid var(--brand-alert-green);
+ margin-right: 0.2rem;
+ margin-top: -0.1rem;
+ vertical-align: middle;
+ animation: pulse 2s ease-in-out infinite;
+ }
+
+ @keyframes pulse {
+ 0% {
+ background: transparent;
+ }
+ 50% {
+ background: var(--brand-alert-green);
+ }
+ 100% {
+ background: transparent;
+ }
+ } */
diff --git a/src/components/Asset/AssetActions/Pool/Sections/Update.tsx b/src/components/Asset/AssetActions/Pool/Sections/Update.tsx
new file mode 100644
index 000000000..1cd3bfb8a
--- /dev/null
+++ b/src/components/Asset/AssetActions/Pool/Sections/Update.tsx
@@ -0,0 +1,17 @@
+import { usePool } from '@context/Pool'
+import Button from '@shared/atoms/Button'
+import React from 'react'
+import styles from './Update.module.css'
+
+export default function Update() {
+ const { fetchAllData } = usePool()
+
+ return (
+
+
+ {/* Fetching every {refreshInterval / 1000} sec. */}
+
+ )
+}
diff --git a/src/components/Asset/AssetActions/Pool/Sections/index.module.css b/src/components/Asset/AssetActions/Pool/Sections/index.module.css
new file mode 100644
index 000000000..4dd63dc04
--- /dev/null
+++ b/src/components/Asset/AssetActions/Pool/Sections/index.module.css
@@ -0,0 +1,20 @@
+.dataToken {
+ font-size: var(--font-size-large);
+ text-align: center;
+}
+
+.dataToken > div {
+ display: block;
+}
+
+.dataTokenLinks {
+ display: flex;
+ justify-content: center;
+ font-size: var(--font-size-small);
+ margin-top: calc(var(--spacer) / 4);
+}
+
+.dataTokenLinks a {
+ margin-left: calc(var(--spacer) / 3);
+ margin-right: calc(var(--spacer) / 3);
+}
diff --git a/src/components/Asset/AssetActions/Pool/Sections/index.tsx b/src/components/Asset/AssetActions/Pool/Sections/index.tsx
new file mode 100644
index 000000000..858ef6bfd
--- /dev/null
+++ b/src/components/Asset/AssetActions/Pool/Sections/index.tsx
@@ -0,0 +1,130 @@
+import { useAsset } from '@context/Asset'
+import { usePool } from '@context/Pool'
+import Tooltip from '@shared/atoms/Tooltip'
+import ExplorerLink from '@shared/ExplorerLink'
+import PriceUnit from '@shared/Price/PriceUnit'
+import React from 'react'
+import Graph from '../Graph'
+import PoolSection from '../Section'
+import Token from '../../../../@shared/Token'
+import content from '../../../../../../content/price.json'
+import styles from './index.module.css'
+import Update from './Update'
+
+export default function PoolSections() {
+ const { asset } = useAsset()
+ const { poolData, poolInfo, poolInfoUser, poolInfoOwner } = usePool()
+
+ return (
+ <>
+
+ {' '}
+ ={' '}
+
+
+
+
+ Pool
+
+
+ Datatoken
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ )
+}
diff --git a/src/components/Asset/AssetActions/Pool/Token.tsx b/src/components/Asset/AssetActions/Pool/Token.tsx
deleted file mode 100644
index bc532a16a..000000000
--- a/src/components/Asset/AssetActions/Pool/Token.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import React, { ReactElement } from 'react'
-import styles from './Token.module.css'
-import PriceUnit from '@shared/Price/PriceUnit'
-import Logo from '@shared/atoms/Logo'
-
-export default function Token({
- symbol,
- balance,
- noIcon,
- size
-}: {
- symbol: string
- balance: string
- noIcon?: boolean
- size?: 'small' | 'mini'
-}): ReactElement {
- return (
-
- )
-}
diff --git a/src/components/Asset/AssetActions/Pool/TokenList.module.css b/src/components/Asset/AssetActions/Pool/TokenList.module.css
deleted file mode 100644
index eadee0548..000000000
--- a/src/components/Asset/AssetActions/Pool/TokenList.module.css
+++ /dev/null
@@ -1,43 +0,0 @@
-.tokenlist {
- margin-left: -2rem;
- margin-right: -2rem;
- padding: calc(var(--spacer) / 1.5) calc(var(--spacer) / 1.5)
- calc(var(--spacer) / 2) calc(var(--spacer) / 1.5);
- border-top: 1px solid var(--border-color);
- position: relative;
-}
-
-@media (min-width: 40rem) {
- .tokenlist {
- padding-left: var(--spacer);
- padding-right: var(--spacer);
- }
-}
-
-.tokenlist.highlight {
- background: var(--background-highlight);
-}
-
-.tokens {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
-}
-
-.title {
- composes: title from './index.module.css';
-}
-
-.totalLiquidity {
- composes: token from './Token.module.css';
- margin-bottom: 0;
- font-weight: var(--font-weight-base) !important;
- font-size: var(--font-size-small);
- padding-left: var(--font-size-base);
- padding-top: calc(var(--spacer) / 10);
-}
-
-.totalLiquidity strong {
- font-size: var(--font-size-base);
- color: var(--font-color-heading);
- line-height: 1;
-}
diff --git a/src/components/Asset/AssetActions/Pool/TokenList.tsx b/src/components/Asset/AssetActions/Pool/TokenList.tsx
deleted file mode 100644
index 53e45fdef..000000000
--- a/src/components/Asset/AssetActions/Pool/TokenList.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import Conversion from '@shared/Price/Conversion'
-import React, { ReactElement, ReactNode } from 'react'
-import Token from './Token'
-import styles from './TokenList.module.css'
-import Decimal from 'decimal.js'
-
-export default function TokenList({
- title,
- children,
- baseTokenValue,
- baseTokenSymbol,
- datatokenValue,
- datatokenSymbol,
- conversion,
- highlight,
- size = 'small'
-}: {
- title?: string | ReactNode
- children?: ReactNode
- baseTokenValue: string
- baseTokenSymbol: string
- datatokenValue?: string
- datatokenSymbol?: string
- conversion?: Decimal
- highlight?: boolean
- size?: 'small' | 'mini'
-}): ReactElement {
- return (
-
- {title &&
{title}
}
-
-
-
- {conversion?.greaterThan(0) && (
-
- )}
- {datatokenValue && (
-
- )}
- {children}
-
-
- )
-}
diff --git a/src/components/Asset/AssetActions/Pool/index.module.css b/src/components/Asset/AssetActions/Pool/index.module.css
deleted file mode 100644
index a1e8b02ca..000000000
--- a/src/components/Asset/AssetActions/Pool/index.module.css
+++ /dev/null
@@ -1,75 +0,0 @@
-.container {
- margin-left: -2rem;
- margin-right: -2rem;
- padding-left: calc(var(--spacer) / 1.5);
- padding-right: calc(var(--spacer) / 1.5);
-}
-
-.dataToken {
- composes: container;
- padding-bottom: calc(var(--spacer) / 1.5);
- font-size: var(--font-size-large);
- text-align: center;
- position: relative;
-}
-
-.dataTokenLinks {
- display: flex;
- justify-content: center;
- font-size: var(--font-size-small);
- margin-top: calc(var(--spacer) / 4);
-}
-
-.dataTokenLinks a {
- margin-left: calc(var(--spacer) / 3);
- margin-right: calc(var(--spacer) / 3);
-}
-
-.title {
- font-size: var(--font-size-base);
- margin-bottom: calc(var(--spacer) / 3);
- color: var(--color-secondary);
-}
-
-.titleInfo {
- font-size: var(--font-size-mini);
- font-family: var(--font-family-base);
- font-weight: var(--font-weight-base);
- display: inline-block;
- margin-left: 0.3rem;
-}
-
-.update {
- composes: container;
- font-size: var(--font-size-mini);
- color: var(--color-secondary);
- text-align: center;
- border-top: 1px solid var(--border-color);
- padding-top: calc(var(--spacer) / 4);
- padding-bottom: calc(var(--spacer) / 4);
-}
-
-/* .update:before {
- content: '';
- width: 6px;
- height: 6px;
- border-radius: 50%;
- display: inline-block;
- border: 1px solid var(--brand-alert-green);
- margin-right: 0.2rem;
- margin-top: -0.1rem;
- vertical-align: middle;
- animation: pulse 2s ease-in-out infinite;
-}
-
-@keyframes pulse {
- 0% {
- background: transparent;
- }
- 50% {
- background: var(--brand-alert-green);
- }
- 100% {
- background: transparent;
- }
-} */
diff --git a/src/components/Asset/AssetActions/Pool/index.tsx b/src/components/Asset/AssetActions/Pool/index.tsx
index 2b9a94bfe..cdabf6838 100644
--- a/src/components/Asset/AssetActions/Pool/index.tsx
+++ b/src/components/Asset/AssetActions/Pool/index.tsx
@@ -1,37 +1,20 @@
import React, { ReactElement, useState } from 'react'
-import styles from './index.module.css'
-import stylesActions from './Actions.module.css'
-import PriceUnit from '@shared/Price/PriceUnit'
+import stylesActions from './Actions/index.module.css'
import Button from '@shared/atoms/Button'
import Add from './Add'
import Remove from './Remove'
-import Tooltip from '@shared/atoms/Tooltip'
-import ExplorerLink from '@shared/ExplorerLink'
-import TokenList from './TokenList'
import AssetActionHistoryTable from '../AssetActionHistoryTable'
-import Graph from './Graph'
import { useAsset } from '@context/Asset'
import { useWeb3 } from '@context/Web3'
import PoolTransactions from '@shared/PoolTransactions'
-import Decimal from 'decimal.js'
-import content from '../../../../../content/price.json'
+
import { usePool } from '@context/Pool'
-import Token from './Token'
+import PoolSections from './Sections'
export default function Pool(): ReactElement {
- const { accountId } = useWeb3()
const { isInPurgatory, asset, isAssetNetwork } = useAsset()
- const {
- poolData,
- poolInfo,
- poolInfoUser,
- poolInfoOwner,
- poolSnapshots,
- hasUserAddedLiquidity,
- isRemoveDisabled,
- fetchAllData
- // refreshInterval
- } = usePool()
+ const { hasUserAddedLiquidity, isRemoveDisabled } = usePool()
+ const { accountId } = useWeb3()
const [showAdd, setShowAdd] = useState(false)
const [showRemove, setShowRemove] = useState(false)
@@ -39,150 +22,13 @@ export default function Pool(): ReactElement {
return (
<>
{showAdd ? (
-
+
) : showRemove ? (
-
+
) : (
<>
-
-
{' '}
- ={' '}
-
-
-
-
- Pool
-
-
- Datatoken
-
-
-
-
- Your Value Locked
-
- {poolInfoUser?.poolShare && (
-
- {poolInfoUser?.poolShare}% of pool
-
- )}
- >
- }
- baseTokenValue={poolInfoUser?.liquidity.toString()}
- baseTokenSymbol={poolInfo?.baseTokenSymbol}
- conversion={poolInfoUser?.liquidity}
- highlight
- />
-
- Owner Value Locked
-
- {poolInfoOwner?.poolShare}% of pool
-
- >
- }
- baseTokenValue={poolInfoOwner?.liquidity.toString()}
- baseTokenSymbol={poolInfo?.baseTokenSymbol}
- conversion={poolInfoOwner?.liquidity}
- />
-
- Pool Statistics
- {poolInfo?.weightDt && (
-
- {poolInfo?.weightBaseToken}/{poolInfo?.weightDt}
-
- )}
-
- >
- }
- baseTokenValue={`${poolInfo?.totalLiquidityInOcean}`}
- baseTokenSymbol={poolInfo?.baseTokenSymbol}
- conversion={poolInfo?.totalLiquidityInOcean}
- />
+
-
-
-
-
-
-
-
-
- {/* Fetching every {refreshInterval / 1000} sec. */}
-
}
value={`${field.value}`}
+ {...field}
onChange={(e: ChangeEvent
) => {
handleChange(e)
handleValueChange(name, Number(e.target.value))
// debounce needed to avoid validating the wrong (pass) value
debounce(() => validateForm(), 100)
}}
- disabled={!accountId || disabled}
- additionalComponent={}
/>
)}
diff --git a/src/components/Footer/BuildId.module.css b/src/components/Footer/BuildId.module.css
index 58fa3b325..86c4cf561 100644
--- a/src/components/Footer/BuildId.module.css
+++ b/src/components/Footer/BuildId.module.css
@@ -1,6 +1,7 @@
.buildId {
- display: inline-block;
+ display: block;
font-size: var(--font-size-mini);
margin-bottom: var(--spacer);
font-family: var(--font-family-monospace);
+ text-align: center;
}
diff --git a/src/components/Footer/Footer.module.css b/src/components/Footer/Footer.module.css
index 5eef707b6..a554d66a8 100644
--- a/src/components/Footer/Footer.module.css
+++ b/src/components/Footer/Footer.module.css
@@ -1,38 +1,69 @@
-.content {
+.footer {
padding: var(--spacer) calc(var(--spacer) / 2);
margin-left: auto;
margin-right: auto;
max-width: var(--layout-max-width);
+ color: var(--brand-grey-light);
+ font-size: var(--font-size-small);
}
-.content a,
-.content button {
+.footer a,
+.footer button {
color: inherit;
}
-.content button {
+.footer button {
text-transform: none;
transform: none !important;
font-weight: var(--font-weight-normal);
}
-.content a:hover,
-.content a:focus,
-.content button:hover,
-.content button:focus {
+.footer a:hover,
+.footer a:focus,
+.footer button:hover,
+.footer button:focus {
color: var(--color-primary);
}
-.content p {
+.copyright > div,
+.copyright > div > p {
display: inline;
}
-.copyright div {
- display: inline-block;
-}
-
-.footer {
- color: var(--brand-grey-light);
- font-size: var(--font-size-small);
+.copyright,
+.grid > div:first-child {
text-align: center;
}
+
+.grid {
+ display: grid;
+ gap: var(--spacer);
+}
+
+@media (min-width: 40rem) {
+ .grid {
+ display: grid;
+ gap: var(--spacer);
+ grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
+ }
+
+ .grid > div:first-child {
+ text-align: left;
+ }
+
+ .copyright {
+ text-align: right;
+ }
+}
+.grid a {
+ text-transform: none;
+ font-family: var(--font-family-base);
+ font-weight: var(--font-weight-base);
+}
+
+.svg {
+ display: inline;
+ fill: currentColor;
+ width: 0.6em;
+ height: 0.6em;
+}
diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx
index 225803a0d..3139942ee 100644
--- a/src/components/Footer/Footer.tsx
+++ b/src/components/Footer/Footer.tsx
@@ -2,56 +2,33 @@ import React, { ReactElement } from 'react'
import styles from './Footer.module.css'
import Markdown from '@shared/Markdown'
import { useSiteMetadata } from '@hooks/useSiteMetadata'
-import Link from 'next/link'
import MarketStats from './MarketStats'
import BuildId from './BuildId'
-import { useUserPreferences } from '@context/UserPreferences'
+import Links from './Links'
import Button from '@shared/atoms/Button'
-import { useGdprMetadata } from '@hooks/useGdprMetadata'
+import External from '@images/external.svg'
export default function Footer(): ReactElement {
- const { copyright, appConfig } = useSiteMetadata()
- const { setShowPPC } = useUserPreferences()
- const { privacyPolicySlug } = useUserPreferences()
-
- const cookies = useGdprMetadata()
-
+ const { copyright } = useSiteMetadata()
const year = new Date().getFullYear()
return (