mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
source tooltip content for advanced price
This commit is contained in:
parent
a5cc84f8df
commit
3811050fa6
@ -89,5 +89,9 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"success": "Asset Created!"
|
"success": "Asset Created!"
|
||||||
|
},
|
||||||
|
"tooltips": {
|
||||||
|
"poolInfo": "Help me",
|
||||||
|
"liquidityProviderFee": "Help me"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React from 'react'
|
import React, { ReactElement } from 'react'
|
||||||
import ReactMarkdown from 'react-markdown'
|
import ReactMarkdown from 'react-markdown'
|
||||||
|
|
||||||
const Markdown = ({
|
const Markdown = ({
|
||||||
@ -7,7 +7,7 @@ const Markdown = ({
|
|||||||
}: {
|
}: {
|
||||||
text: string
|
text: string
|
||||||
className?: string
|
className?: string
|
||||||
}) => {
|
}): ReactElement => {
|
||||||
// fix react-markdown \n transformation
|
// fix react-markdown \n transformation
|
||||||
// https://github.com/rexxars/react-markdown/issues/105#issuecomment-351585313
|
// https://github.com/rexxars/react-markdown/issues/105#issuecomment-351585313
|
||||||
const textCleaned = text.replace(/\\n/g, '\n ')
|
const textCleaned = text.replace(/\\n/g, '\n ')
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import React, { ReactElement, useState, ChangeEvent, useEffect } from 'react'
|
import React, { ReactElement, useState, ChangeEvent, useEffect } from 'react'
|
||||||
|
import { graphql, useStaticQuery } from 'gatsby'
|
||||||
import stylesIndex from './index.module.css'
|
import stylesIndex from './index.module.css'
|
||||||
import styles from './Advanced.module.css'
|
import styles from './Advanced.module.css'
|
||||||
import FormHelp from '../../../atoms/Input/Help'
|
import FormHelp from '../../../atoms/Input/Help'
|
||||||
@ -12,6 +13,23 @@ import InputElement from '../../../atoms/Input/InputElement'
|
|||||||
import Label from '../../../atoms/Input/Label'
|
import Label from '../../../atoms/Input/Label'
|
||||||
import Tooltip from '../../../atoms/Tooltip'
|
import Tooltip from '../../../atoms/Tooltip'
|
||||||
|
|
||||||
|
const query = graphql`
|
||||||
|
query PriceAdvancedQuery {
|
||||||
|
tooltips: allFile(filter: { relativePath: { eq: "pages/publish.json" } }) {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
childPagesJson {
|
||||||
|
tooltips {
|
||||||
|
poolInfo
|
||||||
|
liquidityProviderFee
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
export default function Advanced({
|
export default function Advanced({
|
||||||
ocean,
|
ocean,
|
||||||
tokensToMint,
|
tokensToMint,
|
||||||
@ -25,6 +43,9 @@ export default function Advanced({
|
|||||||
liquidityProviderFee: string
|
liquidityProviderFee: string
|
||||||
onOceanChange: (event: ChangeEvent<HTMLInputElement>) => void
|
onOceanChange: (event: ChangeEvent<HTMLInputElement>) => void
|
||||||
}): ReactElement {
|
}): ReactElement {
|
||||||
|
const data = useStaticQuery(query)
|
||||||
|
const { tooltips } = data.tooltips.edges[0].node.childPagesJson
|
||||||
|
|
||||||
const { appConfig } = useSiteMetadata()
|
const { appConfig } = useSiteMetadata()
|
||||||
const { account, balance, chainId, refreshBalance } = useOcean()
|
const { account, balance, chainId, refreshBalance } = useOcean()
|
||||||
|
|
||||||
@ -76,7 +97,9 @@ export default function Advanced({
|
|||||||
<Wallet />
|
<Wallet />
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<h4 className={styles.title}>Data Token Liquidity Pool</h4>
|
<h4 className={styles.title}>
|
||||||
|
Data Token Liquidity Pool <Tooltip content={tooltips.poolInfo} />
|
||||||
|
</h4>
|
||||||
|
|
||||||
<div className={styles.tokens}>
|
<div className={styles.tokens}>
|
||||||
<Coin
|
<Coin
|
||||||
@ -97,7 +120,8 @@ export default function Advanced({
|
|||||||
|
|
||||||
<footer className={styles.summary}>
|
<footer className={styles.summary}>
|
||||||
<Label htmlFor="liquidityProviderFee">
|
<Label htmlFor="liquidityProviderFee">
|
||||||
Liquidity Provider Fee <Tooltip content="Help Me" />
|
Liquidity Provider Fee{' '}
|
||||||
|
<Tooltip content={tooltips.liquidityProviderFee} />
|
||||||
</Label>
|
</Label>
|
||||||
<InputElement
|
<InputElement
|
||||||
value={liquidityProviderFee}
|
value={liquidityProviderFee}
|
||||||
|
Loading…
Reference in New Issue
Block a user