diff --git a/content/price.json b/content/price.json index 618bfb33e..03ca7d6e5 100644 --- a/content/price.json +++ b/content/price.json @@ -1,5 +1,10 @@ { "create": { + "empty": { + "title": "No Price Created", + "info": "This data set has no price yet. As the publisher you can create a fixed price, or a dynamic price for it. Onwards!", + "action": "Create Pricing" + }, "fixed": { "title": "Fixed", "info": "Set your price for accessing this data set. The datatoken for this data set will be worth the entered amount of OCEAN." diff --git a/src/components/organisms/AssetContent/Pricing/FormPricing/index.tsx b/src/components/organisms/AssetContent/Pricing/FormPricing/index.tsx index 9a10afb7b..ba8ec2b8f 100644 --- a/src/components/organisms/AssetContent/Pricing/FormPricing/index.tsx +++ b/src/components/organisms/AssetContent/Pricing/FormPricing/index.tsx @@ -1,5 +1,4 @@ import React, { ReactElement, useEffect } from 'react' -import { graphql, useStaticQuery } from 'gatsby' import styles from './index.module.css' import Tabs from '../../../../atoms/Tabs' import Fixed from './Fixed' @@ -10,46 +9,16 @@ import { PriceOptionsMarket } from '../../../../../@types/MetaData' import Button from '../../../../atoms/Button' import { DDO } from '@oceanprotocol/lib' -const query = graphql` - query PriceFieldQuery { - content: allFile(filter: { relativePath: { eq: "price.json" } }) { - edges { - node { - childContentJson { - create { - fixed { - title - info - } - dynamic { - title - info - tooltips { - poolInfo - swapFee - communityFee - marketplaceFee - } - } - } - } - } - } - } - } -` - export default function FormPricing({ ddo, - setShowPricing + setShowPricing, + content }: { ddo: DDO setShowPricing: (value: boolean) => void + content: any }): ReactElement { const { debug } = useUserPreferences() - // Get content - const data = useStaticQuery(query) - const content = data.content.edges[0].node.childContentJson.create // Connect with form const { values, setFieldValue, submitForm } = useFormikContext() @@ -88,7 +57,7 @@ export default function FormPricing({