mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-14 17:24:51 +01:00
rather use undefined title, which triggers fallback
This commit is contained in:
parent
2761a615b9
commit
20acdf814a
@ -6,7 +6,7 @@ import { MetadataMarket } from '../../@types/Metadata'
|
||||
import { MetadataStore, Logger, DDO } from '@oceanprotocol/lib'
|
||||
import Alert from '../../components/atoms/Alert'
|
||||
import Loader from '../../components/atoms/Loader'
|
||||
import { useOcean, useMetadata } from '@oceanprotocol/react'
|
||||
import { useOcean } from '@oceanprotocol/react'
|
||||
|
||||
export default function PageTemplateAssetDetails({
|
||||
did,
|
||||
@ -16,7 +16,6 @@ export default function PageTemplateAssetDetails({
|
||||
uri: string
|
||||
}): ReactElement {
|
||||
const { config } = useOcean()
|
||||
const metadataMinimal = useMetadata(did)
|
||||
const [metadata, setMetadata] = useState<MetadataMarket>()
|
||||
const [title, setTitle] = useState<string>()
|
||||
const [error, setError] = useState<string>()
|
||||
@ -62,7 +61,7 @@ export default function PageTemplateAssetDetails({
|
||||
<Alert title={title} text={error} state="error" />
|
||||
</Layout>
|
||||
) : (
|
||||
<Layout title={metadataMinimal.title} uri={uri}>
|
||||
<Layout title={undefined} uri={uri}>
|
||||
<Loader />
|
||||
</Layout>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user