mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Pull from origin v4 + fix conflicts
This commit is contained in:
commit
bfba30fe9d
@ -3,7 +3,7 @@ import { useGdprMetadata } from '@hooks/useGdprMetadata'
|
||||
import { useSiteMetadata } from '@hooks/useSiteMetadata'
|
||||
import Button from '@shared/atoms/Button'
|
||||
import Link from 'next/link'
|
||||
import React from 'react'
|
||||
import React, { Fragment } from 'react'
|
||||
import content from '../../../content/footer.json'
|
||||
import External from '@images/external.svg'
|
||||
import styles from './Links.module.css'
|
||||
@ -16,12 +16,12 @@ export default function Links() {
|
||||
return (
|
||||
<div className={styles.links}>
|
||||
{content.links.map(({ name, url }) => (
|
||||
<>
|
||||
<Fragment key={name}>
|
||||
<Button style="text" size="small" href={url}>
|
||||
{name} <External />
|
||||
</Button>
|
||||
{' — '}
|
||||
</>
|
||||
</Fragment>
|
||||
))}
|
||||
|
||||
<Link href="/imprint">
|
||||
|
@ -24,6 +24,14 @@ export default function Actions({
|
||||
isSubmitting,
|
||||
setFieldValue
|
||||
}: FormikContextType<FormPublishData> = useFormikContext()
|
||||
const { connect, accountId } = useWeb3()
|
||||
|
||||
async function handleActivation(e: FormEvent<HTMLButtonElement>) {
|
||||
// prevent accidentially submitting a form the button might be in
|
||||
e.preventDefault()
|
||||
|
||||
await connect()
|
||||
}
|
||||
|
||||
function handleNext(e: FormEvent) {
|
||||
e.preventDefault()
|
||||
@ -69,6 +77,10 @@ export default function Actions({
|
||||
>
|
||||
Continue
|
||||
</Button>
|
||||
) : !accountId ? (
|
||||
<Button type="submit" style="primary" onClick={handleActivation}>
|
||||
Connect Wallet
|
||||
</Button>
|
||||
) : !isSupportedOceanNetwork ? (
|
||||
<Tooltip
|
||||
content={<UnsuportedNetwork />}
|
||||
@ -82,9 +94,7 @@ export default function Actions({
|
||||
<Button
|
||||
type="submit"
|
||||
style="primary"
|
||||
disabled={
|
||||
values.user.accountId === '' || !isValid || isSubmitting
|
||||
}
|
||||
disabled={isSubmitting || !isValid}
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
|
@ -79,6 +79,10 @@
|
||||
margin-left: var(--spacer);
|
||||
font-size: var(--font-size-small);
|
||||
color: var(--brand-alert-red);
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
@keyframes loader {
|
||||
|
@ -105,6 +105,10 @@ export default function PublishPage({
|
||||
}))
|
||||
} catch (error) {
|
||||
LoggerInstance.error('[publish] error', error.message)
|
||||
if (error.message.length > 65) {
|
||||
error.message = 'No Token created.'
|
||||
}
|
||||
|
||||
setFeedback((prevState) => ({
|
||||
...prevState,
|
||||
'1': {
|
||||
|
Loading…
Reference in New Issue
Block a user