mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
cleanup
This commit is contained in:
parent
f2cfa49c0e
commit
cde444ba8f
@ -1,34 +0,0 @@
|
|||||||
import React, { useEffect, useState, ReactElement } from 'react'
|
|
||||||
import Loader from '../atoms/Loader'
|
|
||||||
import { useOcean } from '@oceanprotocol/react'
|
|
||||||
import { QueryResult } from '@oceanprotocol/lib/dist/node/metadatastore/MetadataStore'
|
|
||||||
import AssetList from './AssetList'
|
|
||||||
|
|
||||||
export default function ConsumedList(): ReactElement {
|
|
||||||
const { ocean, status, accountId } = useOcean()
|
|
||||||
const [queryResult, setQueryResult] = useState<QueryResult>()
|
|
||||||
const [isLoading, setIsLoading] = useState(false)
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
async function getConsumed() {
|
|
||||||
if (!accountId || !ocean) return
|
|
||||||
|
|
||||||
setIsLoading(true)
|
|
||||||
|
|
||||||
// const queryResult = await
|
|
||||||
|
|
||||||
setQueryResult(queryResult)
|
|
||||||
|
|
||||||
setIsLoading(false)
|
|
||||||
}
|
|
||||||
getConsumed()
|
|
||||||
}, [ocean, status, accountId])
|
|
||||||
|
|
||||||
return isLoading ? (
|
|
||||||
<Loader />
|
|
||||||
) : accountId && ocean ? (
|
|
||||||
<AssetList queryResult={queryResult} />
|
|
||||||
) : (
|
|
||||||
<div>Connect your wallet to see your published data sets.</div>
|
|
||||||
)
|
|
||||||
}
|
|
@ -1,9 +1,9 @@
|
|||||||
import React, { ReactElement } from 'react'
|
import React, { ReactElement } from 'react'
|
||||||
import { ComputeItem } from '@oceanprotocol/react'
|
import { ComputeItem } from '@oceanprotocol/react'
|
||||||
import BaseDialog from '../atoms/BaseDialog'
|
import BaseDialog from '../../atoms/BaseDialog'
|
||||||
import styles from './JobDetailsDialog.module.css'
|
import styles from './JobDetailsDialog.module.css'
|
||||||
import MetaItem from '../organisms/AssetContent/MetaItem'
|
import MetaItem from '../../organisms/AssetContent/MetaItem'
|
||||||
import Time from '../atoms/Time'
|
import Time from '../../atoms/Time'
|
||||||
import shortid from 'shortid'
|
import shortid from 'shortid'
|
||||||
import { Link } from 'gatsby'
|
import { Link } from 'gatsby'
|
||||||
|
|
@ -1,22 +1,17 @@
|
|||||||
import React, { useState, ReactElement } from 'react'
|
import React, { useState, ReactElement } from 'react'
|
||||||
import Loader from '../atoms/Loader'
|
import Loader from '../../atoms/Loader'
|
||||||
import {
|
import { useOcean } from '@oceanprotocol/react'
|
||||||
useOcean,
|
|
||||||
OceanConnectionStatus,
|
|
||||||
useSearch,
|
|
||||||
ComputeItem
|
|
||||||
} from '@oceanprotocol/react'
|
|
||||||
|
|
||||||
import Price from '../atoms/Price'
|
import Price from '../../atoms/Price'
|
||||||
import { fromWei } from 'web3-utils'
|
import { fromWei } from 'web3-utils'
|
||||||
import Table from '../atoms/Table'
|
import Table from '../../atoms/Table'
|
||||||
import Button from '../atoms/Button'
|
import Button from '../../atoms/Button'
|
||||||
import { MetadataMain, Logger } from '@oceanprotocol/lib'
|
import { MetadataMain, Logger } from '@oceanprotocol/lib'
|
||||||
import DateCell from '../atoms/Table/DateCell'
|
import DateCell from '../../atoms/Table/DateCell'
|
||||||
import DdoLinkCell from '../atoms/Table/DdoLinkCell'
|
import DdoLinkCell from '../../atoms/Table/DdoLinkCell'
|
||||||
import shortid from 'shortid'
|
import shortid from 'shortid'
|
||||||
import ActionsCell from '../atoms/Table/ActionsCell'
|
import ActionsCell from '../../atoms/Table/ActionsCell'
|
||||||
import JobDetailsDialog from '../molecules/JobDetailsDialog'
|
import JobDetailsDialog from './JobDetailsDialog'
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
@ -1,8 +1,8 @@
|
|||||||
import React, { useEffect, useState, ReactElement } from 'react'
|
import React, { useEffect, useState, ReactElement } from 'react'
|
||||||
import Loader from '../atoms/Loader'
|
import Loader from '../../atoms/Loader'
|
||||||
import { useOcean } from '@oceanprotocol/react'
|
import { useOcean } from '@oceanprotocol/react'
|
||||||
import { QueryResult } from '@oceanprotocol/lib/dist/node/metadatastore/MetadataStore'
|
import { QueryResult } from '@oceanprotocol/lib/dist/node/metadatastore/MetadataStore'
|
||||||
import AssetList from './AssetList'
|
import AssetList from '../../organisms/AssetList'
|
||||||
|
|
||||||
export default function PublishedList(): ReactElement {
|
export default function PublishedList(): ReactElement {
|
||||||
const { ocean, status, accountId } = useOcean()
|
const { ocean, status, accountId } = useOcean()
|
@ -21,7 +21,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.section {
|
.section {
|
||||||
composes: box from '../atoms/Box.module.css';
|
composes: box from '../../atoms/Box.module.css';
|
||||||
margin-bottom: var(--spacer);
|
margin-bottom: var(--spacer);
|
||||||
}
|
}
|
||||||
|
|
@ -1,18 +1,13 @@
|
|||||||
import React, { ReactElement, ReactNode } from 'react'
|
import React, { ReactElement, ReactNode } from 'react'
|
||||||
import styles from './History.module.css'
|
import styles from './index.module.css'
|
||||||
import ConsumedList from '../organisms/ConsumedList'
|
import PublishedList from './PublishedList'
|
||||||
import PublishedList from '../organisms/PublishedList'
|
import JobsList from './JobsList'
|
||||||
import JobsList from '../organisms/JobsList'
|
|
||||||
|
|
||||||
const sections = [
|
const sections = [
|
||||||
{
|
{
|
||||||
title: 'Published',
|
title: 'Published',
|
||||||
component: <PublishedList />
|
component: <PublishedList />
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: 'Downloaded',
|
|
||||||
component: <ConsumedList />
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: 'Compute Jobs',
|
title: 'Compute Jobs',
|
||||||
component: 'Coming Soon...'
|
component: 'Coming Soon...'
|
Loading…
x
Reference in New Issue
Block a user