1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00
This commit is contained in:
Matthias Kretschmann 2020-09-09 13:52:23 +02:00
parent f2cfa49c0e
commit cde444ba8f
Signed by: m
GPG Key ID: 606EEEF3C479A91F
8 changed files with 18 additions and 62 deletions

View File

@ -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>
)
}

View File

@ -1,9 +1,9 @@
import React, { ReactElement } from 'react'
import { ComputeItem } from '@oceanprotocol/react'
import BaseDialog from '../atoms/BaseDialog'
import BaseDialog from '../../atoms/BaseDialog'
import styles from './JobDetailsDialog.module.css'
import MetaItem from '../organisms/AssetContent/MetaItem'
import Time from '../atoms/Time'
import MetaItem from '../../organisms/AssetContent/MetaItem'
import Time from '../../atoms/Time'
import shortid from 'shortid'
import { Link } from 'gatsby'

View File

@ -1,22 +1,17 @@
import React, { useState, ReactElement } from 'react'
import Loader from '../atoms/Loader'
import {
useOcean,
OceanConnectionStatus,
useSearch,
ComputeItem
} from '@oceanprotocol/react'
import Loader from '../../atoms/Loader'
import { useOcean } from '@oceanprotocol/react'
import Price from '../atoms/Price'
import Price from '../../atoms/Price'
import { fromWei } from 'web3-utils'
import Table from '../atoms/Table'
import Button from '../atoms/Button'
import Table from '../../atoms/Table'
import Button from '../../atoms/Button'
import { MetadataMain, Logger } from '@oceanprotocol/lib'
import DateCell from '../atoms/Table/DateCell'
import DdoLinkCell from '../atoms/Table/DdoLinkCell'
import DateCell from '../../atoms/Table/DateCell'
import DdoLinkCell from '../../atoms/Table/DdoLinkCell'
import shortid from 'shortid'
import ActionsCell from '../atoms/Table/ActionsCell'
import JobDetailsDialog from '../molecules/JobDetailsDialog'
import ActionsCell from '../../atoms/Table/ActionsCell'
import JobDetailsDialog from './JobDetailsDialog'
const columns = [
{

View File

@ -1,8 +1,8 @@
import React, { useEffect, useState, ReactElement } from 'react'
import Loader from '../atoms/Loader'
import Loader from '../../atoms/Loader'
import { useOcean } from '@oceanprotocol/react'
import { QueryResult } from '@oceanprotocol/lib/dist/node/metadatastore/MetadataStore'
import AssetList from './AssetList'
import AssetList from '../../organisms/AssetList'
export default function PublishedList(): ReactElement {
const { ocean, status, accountId } = useOcean()

View File

@ -21,7 +21,7 @@
}
.section {
composes: box from '../atoms/Box.module.css';
composes: box from '../../atoms/Box.module.css';
margin-bottom: var(--spacer);
}

View File

@ -1,18 +1,13 @@
import React, { ReactElement, ReactNode } from 'react'
import styles from './History.module.css'
import ConsumedList from '../organisms/ConsumedList'
import PublishedList from '../organisms/PublishedList'
import JobsList from '../organisms/JobsList'
import styles from './index.module.css'
import PublishedList from './PublishedList'
import JobsList from './JobsList'
const sections = [
{
title: 'Published',
component: <PublishedList />
},
{
title: 'Downloaded',
component: <ConsumedList />
},
{
title: 'Compute Jobs',
component: 'Coming Soon...'