Skip to content

Commit

Permalink
copy, form box
Browse files Browse the repository at this point in the history
  • Loading branch information
kremalicious committed Nov 23, 2020
1 parent f846a0f commit f3634f8
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/pages/update.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import { useOcean } from '@oceanprotocol/react'
import Loader from '../components/atoms/Loader'
import { DDO } from '@oceanprotocol/lib'
import Alert from '../components/atoms/Alert'
import styles from '../components/atoms/Box.module.css'

const pageTitle = 'Update Data Set'
const pageDescription =
'Interim solution for updating title & description of a data set until a proper editing flow is implemented. No validation, no checks. Make sure your DID is correct and you are connected with the account you published the to-be-edited data set.'
'Interim solution for updating title & description of a data set until a proper editing flow is implemented. No validation, no checks. Make sure your DID is correct and that you are connected with the account you used to published your data set.'

export default function PageGatsbyUpdateAsset(props: PageProps): ReactElement {
const { ocean, account } = useOcean()
Expand Down Expand Up @@ -54,8 +55,14 @@ export default function PageGatsbyUpdateAsset(props: PageProps): ReactElement {

return (
<Layout title={pageTitle} description={pageDescription} uri={props.uri}>
<form>
<Input name="did" label="DID" onChange={handleChangeDid} required />
<form className={styles.box}>
<Input
name="did"
label="DID"
placeholder="e.g. did:op:C1d97aEAb57622B2d139f10351B48CBf94071e5c"
onChange={handleChangeDid}
required
/>
<Input name="title" label="New Title" onChange={handleChangeTitle} />
<Input
type="textarea"
Expand All @@ -64,7 +71,11 @@ export default function PageGatsbyUpdateAsset(props: PageProps): ReactElement {
onChange={handleChangeDescription}
rows={4}
/>
<Button style="primary" onClick={handleSubmit}>
<Button
style="primary"
onClick={handleSubmit}
disabled={isLoading || !ocean || !account || !did}
>
{isLoading ? <Loader /> : 'Submit'}
</Button>

Expand Down

0 comments on commit f3634f8

Please sign in to comment.