mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
format fix
This commit is contained in:
parent
77ea9d0432
commit
6cac77607b
@ -1,5 +1,4 @@
|
||||
.customOverlay {
|
||||
|
||||
}
|
||||
.customModal {
|
||||
border-radius: 15px;
|
||||
|
35
src/components/atoms/BaseDialog.tsx
Normal file
35
src/components/atoms/BaseDialog.tsx
Normal file
@ -0,0 +1,35 @@
|
||||
import React from 'react'
|
||||
import styles from './BaseDialog.module.css'
|
||||
import { Modal } from 'react-responsive-modal'
|
||||
|
||||
export default function BaseDialog({
|
||||
open,
|
||||
title,
|
||||
onClose,
|
||||
children,
|
||||
disableClose,
|
||||
actions,
|
||||
...other
|
||||
}: {
|
||||
open: boolean
|
||||
title: string
|
||||
onClose: () => void
|
||||
children: React.ReactNode
|
||||
disableClose?: boolean
|
||||
actions?: any
|
||||
}) {
|
||||
return (
|
||||
<Modal
|
||||
open={open}
|
||||
onClose={onClose}
|
||||
classNames={{
|
||||
overlay: 'customOverlay',
|
||||
modal: 'customModal'
|
||||
}}
|
||||
{...other}
|
||||
>
|
||||
<h2>{title}</h2>
|
||||
<p>{children}</p>
|
||||
</Modal>
|
||||
)
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
import React from 'react'
|
||||
import styles from './BaseDialog.module.css'
|
||||
import { Modal } from "react-responsive-modal";
|
||||
|
||||
|
||||
export default function BaseDialog({
|
||||
open,
|
||||
title,
|
||||
onClose,
|
||||
children,
|
||||
disableClose,
|
||||
actions,
|
||||
...other }: {
|
||||
open: boolean
|
||||
title: string
|
||||
onClose: () => void
|
||||
children: React.ReactNode
|
||||
disableClose?: boolean
|
||||
actions?: any
|
||||
}) {
|
||||
|
||||
return (
|
||||
<Modal open={open} onClose={onClose} classNames={{
|
||||
overlay: 'customOverlay',
|
||||
modal: 'customModal',
|
||||
}} {...other}>
|
||||
<h2>{title}</h2>
|
||||
<p>
|
||||
{children}
|
||||
</p>
|
||||
</Modal>
|
||||
)
|
||||
}
|
@ -16,7 +16,10 @@ import {
|
||||
import styles from './Compute.module.css'
|
||||
import Button from '../atoms/Button'
|
||||
import Input from '../atoms/Input/Input'
|
||||
import { LoggerInstance, LogLevel } from '@oceanprotocol/squid/dist/node/utils/Logger'
|
||||
import {
|
||||
LoggerInstance,
|
||||
LogLevel
|
||||
} from '@oceanprotocol/squid/dist/node/utils/Logger'
|
||||
|
||||
export default function Compute({
|
||||
ddo,
|
||||
@ -29,7 +32,6 @@ export default function Compute({
|
||||
}) {
|
||||
if (!ddo) return null
|
||||
|
||||
|
||||
const { compute, isLoading, computeStepText, computeError } = useCompute()
|
||||
const [isJobStarting, setIsJobStarting] = useState(false)
|
||||
const [, setError] = useState('')
|
||||
@ -60,7 +62,6 @@ export default function Compute({
|
||||
!isTermsAgreed
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
setIsBalanceSufficient(
|
||||
isFree ||
|
||||
(balance !== null &&
|
||||
|
@ -71,27 +71,30 @@ export default function JobsList() {
|
||||
const { getComputeItems } = useSearch()
|
||||
|
||||
const getJobs = async () => {
|
||||
if (!accountId || !ocean || status !== OceanConnectionStatus.CONNECTED) return
|
||||
if (!accountId || !ocean || status !== OceanConnectionStatus.CONNECTED)
|
||||
return
|
||||
setIsLoading(true)
|
||||
setUserAgreed(true)
|
||||
try {
|
||||
|
||||
|
||||
const jobList = await ocean.compute.status(account)
|
||||
console.log(jobList)
|
||||
const computeItemss = await Promise.all(
|
||||
jobList.map(async (job) => {
|
||||
jobList.map(async job => {
|
||||
if (!job) return
|
||||
try {
|
||||
|
||||
const { did } = await ocean.keeper.agreementStoreManager.getAgreement(
|
||||
const {
|
||||
did
|
||||
} = await ocean.keeper.agreementStoreManager.getAgreement(
|
||||
job.agreementId
|
||||
)
|
||||
console.log(did)
|
||||
if(did==='0x0000000000000000000000000000000000000000000000000000000000000000') return
|
||||
if (
|
||||
did ===
|
||||
'0x0000000000000000000000000000000000000000000000000000000000000000'
|
||||
)
|
||||
return
|
||||
const ddo = await ocean.assets.resolve(did)
|
||||
if (ddo) {
|
||||
|
||||
// Since we are getting assets from chain there might be
|
||||
// assets from other marketplaces. So return only those assets
|
||||
// whose serviceEndpoint contains the configured Aquarius URI.
|
||||
@ -103,16 +106,14 @@ export default function JobsList() {
|
||||
return { job, ddo }
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
|
||||
})
|
||||
)
|
||||
|
||||
const computeItems = computeItemss.filter(
|
||||
(value) => value !== undefined
|
||||
value => value !== undefined
|
||||
) as ComputeItem[] | undefined
|
||||
|
||||
// const computeItems = await getComputeItems()
|
||||
|
@ -34,7 +34,6 @@ const AssetDetailsPageMeta = ({
|
||||
}) => {
|
||||
if (!attributes) return null
|
||||
|
||||
|
||||
const { ocean, balanceInOcean } = useOcean()
|
||||
const { datePublished } = attributes.main
|
||||
const {
|
||||
|
@ -36,8 +36,7 @@ export interface OceanConfig extends Config {
|
||||
// why is this partial?
|
||||
export const config: OceanConfig = {
|
||||
nodeUri: 'https://pacific.oceanprotocol.com',
|
||||
aquariusUri:
|
||||
'https://aquarius.marketplace.oceanprotocol.com',
|
||||
aquariusUri: 'https://aquarius.marketplace.oceanprotocol.com',
|
||||
brizoUri: 'https://brizo.marketplace.oceanprotocol.com',
|
||||
brizoAddress: '0x00c6A0BC5cD0078d6Cd0b659E8061B404cfa5704',
|
||||
secretStoreUri: 'https://secret-store.oceanprotocol.com',
|
||||
|
Loading…
Reference in New Issue
Block a user