diff --git a/packages/client/dashboard/src/App.tsx b/packages/client/dashboard/src/App.tsx index 10c7726..dd3fecd 100644 --- a/packages/client/dashboard/src/App.tsx +++ b/packages/client/dashboard/src/App.tsx @@ -3,9 +3,9 @@ import { ProfileStateProvider } from '@us3r-network/profile' import dayjs from 'dayjs' import relativeTime from 'dayjs/plugin/relativeTime' import { useEffect, useState } from 'react' -import { Radio, RadioGroup } from 'react-aria-components' +// import { Radio, RadioGroup } from 'react-aria-components' import { - NavLink, + // NavLink, Outlet, Route, Routes, @@ -171,25 +171,25 @@ function BuildLayout () { const [selectModel, setSelectModel] = useState() const [selectComposite, setSelectComposite] = useState() const { pathname } = useLocation() - const defaultKey = pathname.split('/build/')[1] - const PAGES = [ - { - id: 'editor', - label: 'Editor' - }, - { - id: 'playground', - label: 'Playground' - }, - { - id: 'sdk', - label: 'SDK' - }, - { - id: 'metrics', - label: 'Metrics' - } - ] + // const defaultKey = pathname.split('/build/')[1] + // const PAGES = [ + // { + // id: 'editor', + // label: 'Editor' + // }, + // { + // id: 'playground', + // label: 'Playground' + // }, + // { + // id: 'sdk', + // label: 'SDK' + // }, + // { + // id: 'metrics', + // label: 'Metrics' + // } + // ] return ( - {page.label} ))} - + */} ) } function ExploreLayout () { - const { pathname } = useLocation() - const defaultKey = pathname.split('/explore/')[1] - const PAGES = [ - { - id: 'model', - label: 'Models' - }, - { - id: 'composite', - label: 'Composites' - }, - { - id: 'components', - label: 'Components' - } - ] + // const { pathname } = useLocation() + // const defaultKey = pathname.split('/explore/')[1] + // const PAGES = [ + // { + // id: 'model', + // label: 'Models' + // }, + // { + // id: 'composite', + // label: 'Composites' + // }, + // { + // id: 'components', + // label: 'Components' + // } + // ] return ( - {page.label} ))} - + */} ) } diff --git a/packages/client/dashboard/src/components/model/CompositeEditor.tsx b/packages/client/dashboard/src/components/model/CompositeEditor.tsx index 2438708..5b9b3bf 100644 --- a/packages/client/dashboard/src/components/model/CompositeEditor.tsx +++ b/packages/client/dashboard/src/components/model/CompositeEditor.tsx @@ -4,20 +4,21 @@ import { useEffect, useState } from 'react' import styled from 'styled-components' import { useCeramicNodeCtx } from '../../context/CeramicNodeCtx' import { getRuntimeDefinitionFromEncodedComposite } from '../../utils/composeDBUtils' -import { schemas } from '../../utils/composedb-types/schemas' import CodeDownload from './CodeDownload' export default function CompositeEditor ({ schema, + library, encodedDefinition }: { schema?: string + library?: string encodedDefinition: string }) { const { currCeramicNode } = useCeramicNodeCtx() const [gqlSchema, setGqlSchema] = useState({ code: schema || '', - libraries: schemas.library + libraries: library || '' }) const [runtimeDefinition, setRuntimeDefinition] = useState(null) @@ -39,9 +40,9 @@ export default function CompositeEditor ({ useEffect(() => { setGqlSchema({ code: schema || '', - libraries: schemas.library + libraries: library || '' }) - }, [schema]) + }, [library, schema]) return ( diff --git a/packages/client/dashboard/src/container/DappEditor.tsx b/packages/client/dashboard/src/container/DappEditor.tsx index 72c8680..a70dec8 100644 --- a/packages/client/dashboard/src/container/DappEditor.tsx +++ b/packages/client/dashboard/src/container/DappEditor.tsx @@ -46,6 +46,7 @@ export default function DappEditor () {
diff --git a/packages/client/dashboard/src/utils/composedb-types/scalars.ts b/packages/client/dashboard/src/utils/composedb-types/scalars.ts index a0e9cb0..bdcb7ec 100644 --- a/packages/client/dashboard/src/utils/composedb-types/scalars.ts +++ b/packages/client/dashboard/src/utils/composedb-types/scalars.ts @@ -98,10 +98,10 @@ export const extraScalars: Record = { ...getGraphQLScalarSchema('date'), maxLength: 100, }, - // DateTime: { - // ...getGraphQLScalarSchema('datetime'), - // maxLength: 100, - // }, + DateTime: { + ...getGraphQLScalarSchema('datetime'), + maxLength: 100, + }, DID: { ...getGraphQLScalarSchema('did'), maxLength: 100 }, Latitude: getGraphQLScalarSchema('latitude'), LocalDate: { @@ -126,7 +126,7 @@ export const extraScalars: Record = { ...getGraphQLScalarSchema('timezone'), maxLength: 100, }, - // URI: { ...getGraphQLScalarSchema('uri'), maxLength: 100 }, + URI: { ...getGraphQLScalarSchema('uri'), maxLength: 100 }, UTCOffset: { ...getGraphQLScalarSchema('utcoffset'), maxLength: 100,