mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
asset details component reorder
This commit is contained in:
parent
b653ed7990
commit
85b76a727b
@ -15,7 +15,7 @@ exports.createPages = async ({ graphql, actions }) => {
|
|||||||
|
|
||||||
// Create pages for all assets
|
// Create pages for all assets
|
||||||
const assetDetailsTemplate = path.resolve(
|
const assetDetailsTemplate = path.resolve(
|
||||||
'src/components/templates/AssetDetails/index.tsx'
|
'src/components/templates/AssetDetails.tsx'
|
||||||
)
|
)
|
||||||
|
|
||||||
const result = await graphql(`
|
const result = await graphql(`
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import React 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 '../templates/AssetDetails/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'
|
||||||
@ -15,7 +15,7 @@ export default function JobDetailsDialog({
|
|||||||
computeItem: ComputeItem | undefined
|
computeItem: ComputeItem | undefined
|
||||||
isOpen: boolean
|
isOpen: boolean
|
||||||
onClose: () => void
|
onClose: () => void
|
||||||
}) {
|
}): ReactElement {
|
||||||
if (!computeItem) return null
|
if (!computeItem) return null
|
||||||
|
|
||||||
const { attributes } = computeItem.ddo.findServiceByType('metadata')
|
const { attributes } = computeItem.ddo.findServiceByType('metadata')
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React from 'react'
|
import React, { ReactElement } from 'react'
|
||||||
import styles from './MetaItem.module.css'
|
import styles from './MetaItem.module.css'
|
||||||
|
|
||||||
export default function MetaItem({
|
export default function MetaItem({
|
||||||
@ -7,7 +7,7 @@ export default function MetaItem({
|
|||||||
}: {
|
}: {
|
||||||
title: string
|
title: string
|
||||||
content: any
|
content: any
|
||||||
}) {
|
}): ReactElement {
|
||||||
return (
|
return (
|
||||||
<div className={styles.metaItem}>
|
<div className={styles.metaItem}>
|
||||||
<h3 className={styles.title}>{title}</h3>
|
<h3 className={styles.title}>{title}</h3>
|
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useEffect } from 'react'
|
import React, { useState, useEffect, ReactElement } from 'react'
|
||||||
import { toast } from 'react-toastify'
|
import { toast } from 'react-toastify'
|
||||||
import Rating from '../../atoms/Rating'
|
import Rating from '../../atoms/Rating'
|
||||||
import rateAsset from '../../../utils/rateAsset'
|
import rateAsset from '../../../utils/rateAsset'
|
||||||
@ -13,7 +13,7 @@ export default function RatingAction({
|
|||||||
}: {
|
}: {
|
||||||
did: DID | string
|
did: DID | string
|
||||||
onVote: () => void
|
onVote: () => void
|
||||||
}) {
|
}): ReactElement {
|
||||||
const { web3, account } = useWeb3()
|
const { web3, account } = useWeb3()
|
||||||
const [rating, setRating] = useState<number>(0)
|
const [rating, setRating] = useState<number>(0)
|
||||||
const [isloading, setIsLoading] = useState(false)
|
const [isloading, setIsLoading] = useState(false)
|
@ -6,10 +6,10 @@ import { Link } from 'gatsby'
|
|||||||
import Markdown from '../../atoms/Markdown'
|
import Markdown from '../../atoms/Markdown'
|
||||||
import Tags from '../../atoms/Tags'
|
import Tags from '../../atoms/Tags'
|
||||||
import MetaFull from './MetaFull'
|
import MetaFull from './MetaFull'
|
||||||
import Compute from '../../organisms/Compute'
|
import Compute from '../Compute'
|
||||||
import Consume from '../../organisms/Consume'
|
import Consume from '../Consume'
|
||||||
import MetaSecondary from './MetaSecondary'
|
import MetaSecondary from './MetaSecondary'
|
||||||
import styles from './AssetContent.module.css'
|
import styles from './index.module.css'
|
||||||
|
|
||||||
export interface AssetContentProps {
|
export interface AssetContentProps {
|
||||||
metadata: MetaDataMarket
|
metadata: MetaDataMarket
|
@ -1,7 +1,7 @@
|
|||||||
import React, { ReactElement } from 'react'
|
import React, { ReactElement } from 'react'
|
||||||
import { PageProps, graphql } from 'gatsby'
|
import { PageProps, graphql } from 'gatsby'
|
||||||
import Layout from '../../../components/Layout'
|
import Layout from '../Layout'
|
||||||
import AssetContent from './AssetContent'
|
import AssetContent from '../organisms/AssetContent'
|
||||||
|
|
||||||
export default function AssetDetailsTemplate(props: PageProps): ReactElement {
|
export default function AssetDetailsTemplate(props: PageProps): ReactElement {
|
||||||
const { asset } = props.data as any
|
const { asset } = props.data as any
|
@ -1,6 +1,6 @@
|
|||||||
import React, { useState, useEffect, ReactElement } from 'react'
|
import React, { useState, useEffect, ReactElement } from 'react'
|
||||||
import { Router } from '@reach/router'
|
import { Router } from '@reach/router'
|
||||||
import AssetContent from '../../components/templates/AssetDetails/AssetContent'
|
import AssetContent from '../../components/organisms/AssetContent'
|
||||||
import Layout from '../../components/Layout'
|
import Layout from '../../components/Layout'
|
||||||
import { PageProps } from 'gatsby'
|
import { PageProps } from 'gatsby'
|
||||||
import { MetaDataMarket, ServiceMetaDataMarket } from '../../@types/MetaData'
|
import { MetaDataMarket, ServiceMetaDataMarket } from '../../@types/MetaData'
|
||||||
|
Loading…
Reference in New Issue
Block a user