Website changes docs playground (#10413)

From #10376 (extracting website related changes to deploy them
separately, later)

---------

Co-authored-by: oliver <8559757+oliverqx@users.noreply.github.com>
This commit is contained in:
Félix Malfait
2025-06-10 15:01:24 +02:00
committed by GitHub
parent b74f6901b4
commit 02bd15d61f
18 changed files with 128 additions and 663 deletions

View File

@ -1,13 +0,0 @@
'use client';
import dynamic from 'next/dynamic';
const GraphQlPlayground = dynamic(
() => import('@/app/_components/playground/graphql-playground'),
{ ssr: false },
);
const CoreGraphql = () => {
return <GraphQlPlayground subDoc={'core'} />;
};
export default CoreGraphql;

View File

@ -1,13 +0,0 @@
'use client';
import dynamic from 'next/dynamic';
const GraphQlPlayground = dynamic(
() => import('@/app/_components/playground/graphql-playground'),
{ ssr: false },
);
const MetadataGraphql = () => {
return <GraphQlPlayground subDoc={'metadata'} />;
};
export default MetadataGraphql;

View File

@ -1,33 +0,0 @@
'use client';
import { useEffect, useState } from 'react';
import Playground from '@/app/_components/playground/playground';
import { RestApiWrapper } from '@/app/_components/playground/rest-api-wrapper';
const RestApi = () => {
const [openApiJson, setOpenApiJson] = useState({});
const [isClient, setIsClient] = useState(false);
useEffect(() => {
setIsClient(true);
}, []);
if (!isClient) {
return null;
}
const children = <RestApiWrapper openApiJson={openApiJson} />;
return (
<div style={{ width: '100vw' }}>
<Playground
children={children}
setOpenApiJson={setOpenApiJson}
subDoc="core"
/>
</div>
);
};
export default RestApi;

View File

@ -1,30 +0,0 @@
'use client';
import React, { useEffect, useState } from 'react';
import Playground from '@/app/_components/playground/playground';
import { RestApiWrapper } from '@/app/_components/playground/rest-api-wrapper';
const restApi = () => {
const [openApiJson, setOpenApiJson] = useState({});
const [isClient, setIsClient] = useState(false);
useEffect(() => {
setIsClient(true);
}, []);
if (!isClient) {
return null;
}
const children = <RestApiWrapper openApiJson={openApiJson} />;
return (
<Playground
children={children}
setOpenApiJson={setOpenApiJson}
subDoc="metadata"
/>
);
};
export default restApi;