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 {
|
.customOverlay {
|
||||||
|
|
||||||
}
|
}
|
||||||
.customModal {
|
.customModal {
|
||||||
border-radius: 15px;
|
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 styles from './Compute.module.css'
|
||||||
import Button from '../atoms/Button'
|
import Button from '../atoms/Button'
|
||||||
import Input from '../atoms/Input/Input'
|
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({
|
export default function Compute({
|
||||||
ddo,
|
ddo,
|
||||||
@ -29,7 +32,6 @@ export default function Compute({
|
|||||||
}) {
|
}) {
|
||||||
if (!ddo) return null
|
if (!ddo) return null
|
||||||
|
|
||||||
|
|
||||||
const { compute, isLoading, computeStepText, computeError } = useCompute()
|
const { compute, isLoading, computeStepText, computeError } = useCompute()
|
||||||
const [isJobStarting, setIsJobStarting] = useState(false)
|
const [isJobStarting, setIsJobStarting] = useState(false)
|
||||||
const [, setError] = useState('')
|
const [, setError] = useState('')
|
||||||
@ -60,7 +62,6 @@ export default function Compute({
|
|||||||
!isTermsAgreed
|
!isTermsAgreed
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
setIsBalanceSufficient(
|
setIsBalanceSufficient(
|
||||||
isFree ||
|
isFree ||
|
||||||
(balance !== null &&
|
(balance !== null &&
|
||||||
|
@ -71,27 +71,30 @@ export default function JobsList() {
|
|||||||
const { getComputeItems } = useSearch()
|
const { getComputeItems } = useSearch()
|
||||||
|
|
||||||
const getJobs = async () => {
|
const getJobs = async () => {
|
||||||
if (!accountId || !ocean || status !== OceanConnectionStatus.CONNECTED) return
|
if (!accountId || !ocean || status !== OceanConnectionStatus.CONNECTED)
|
||||||
|
return
|
||||||
setIsLoading(true)
|
setIsLoading(true)
|
||||||
setUserAgreed(true)
|
setUserAgreed(true)
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
const jobList = await ocean.compute.status(account)
|
const jobList = await ocean.compute.status(account)
|
||||||
console.log(jobList)
|
console.log(jobList)
|
||||||
const computeItemss = await Promise.all(
|
const computeItemss = await Promise.all(
|
||||||
jobList.map(async (job) => {
|
jobList.map(async job => {
|
||||||
if (!job) return
|
if (!job) return
|
||||||
try {
|
try {
|
||||||
|
const {
|
||||||
const { did } = await ocean.keeper.agreementStoreManager.getAgreement(
|
did
|
||||||
|
} = await ocean.keeper.agreementStoreManager.getAgreement(
|
||||||
job.agreementId
|
job.agreementId
|
||||||
)
|
)
|
||||||
console.log(did)
|
console.log(did)
|
||||||
if(did==='0x0000000000000000000000000000000000000000000000000000000000000000') return
|
if (
|
||||||
|
did ===
|
||||||
|
'0x0000000000000000000000000000000000000000000000000000000000000000'
|
||||||
|
)
|
||||||
|
return
|
||||||
const ddo = await ocean.assets.resolve(did)
|
const ddo = await ocean.assets.resolve(did)
|
||||||
if (ddo) {
|
if (ddo) {
|
||||||
|
|
||||||
// Since we are getting assets from chain there might be
|
// Since we are getting assets from chain there might be
|
||||||
// assets from other marketplaces. So return only those assets
|
// assets from other marketplaces. So return only those assets
|
||||||
// whose serviceEndpoint contains the configured Aquarius URI.
|
// whose serviceEndpoint contains the configured Aquarius URI.
|
||||||
@ -103,16 +106,14 @@ export default function JobsList() {
|
|||||||
return { job, ddo }
|
return { job, ddo }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} catch (err) {
|
||||||
catch (err) {
|
|
||||||
console.log(err)
|
console.log(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
const computeItems = computeItemss.filter(
|
const computeItems = computeItemss.filter(
|
||||||
(value) => value !== undefined
|
value => value !== undefined
|
||||||
) as ComputeItem[] | undefined
|
) as ComputeItem[] | undefined
|
||||||
|
|
||||||
// const computeItems = await getComputeItems()
|
// const computeItems = await getComputeItems()
|
||||||
|
@ -34,7 +34,6 @@ const AssetDetailsPageMeta = ({
|
|||||||
}) => {
|
}) => {
|
||||||
if (!attributes) return null
|
if (!attributes) return null
|
||||||
|
|
||||||
|
|
||||||
const { ocean, balanceInOcean } = useOcean()
|
const { ocean, balanceInOcean } = useOcean()
|
||||||
const { datePublished } = attributes.main
|
const { datePublished } = attributes.main
|
||||||
const {
|
const {
|
||||||
|
@ -36,8 +36,7 @@ export interface OceanConfig extends Config {
|
|||||||
// why is this partial?
|
// why is this partial?
|
||||||
export const config: OceanConfig = {
|
export const config: OceanConfig = {
|
||||||
nodeUri: 'https://pacific.oceanprotocol.com',
|
nodeUri: 'https://pacific.oceanprotocol.com',
|
||||||
aquariusUri:
|
aquariusUri: 'https://aquarius.marketplace.oceanprotocol.com',
|
||||||
'https://aquarius.marketplace.oceanprotocol.com',
|
|
||||||
brizoUri: 'https://brizo.marketplace.oceanprotocol.com',
|
brizoUri: 'https://brizo.marketplace.oceanprotocol.com',
|
||||||
brizoAddress: '0x00c6A0BC5cD0078d6Cd0b659E8061B404cfa5704',
|
brizoAddress: '0x00c6A0BC5cD0078d6Cd0b659E8061B404cfa5704',
|
||||||
secretStoreUri: 'https://secret-store.oceanprotocol.com',
|
secretStoreUri: 'https://secret-store.oceanprotocol.com',
|
||||||
|
Loading…
Reference in New Issue
Block a user