File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change 33import React from 'react' ;
44import Link from 'next/link'
55import { ArrowLeftIcon } from '@heroicons/react/20/solid' ;
6- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
7- // @ts -ignore
8- import { API } from '@stoplight/elements' ;
6+ import dynamic from 'next/dynamic' ;
97import '@stoplight/elements/styles.min.css' ;
8+ import './styles.css' ;
109
11- import './styles.css'
10+ interface OpenApiProps {
11+ apiDescriptionUrl : string ;
12+ router : 'history' | 'hash' | 'memory' ;
13+ }
1214
13- const OpenAPi = ( ) => (
15+ // @ts -ignore - Ignoring TypeScript errors for dynamic import
16+ const OpenAPi = dynamic < OpenApiProps > ( ( ) => import ( '@stoplight/elements' ) . then ( mod => mod . API ) , {
17+ ssr : false
18+ } )
19+
20+ const OpenApiPage : React . FC = ( ) => (
1421 < div className = "App" >
1522 < nav className = 'p-6 bg-white' >
1623 < Link href = '/' className = "!font-grotesk group inline-flex items-center text-sm text-gray-600 hover:text-gray-800 font-medium" >
1724 < ArrowLeftIcon className = "inline h-3 mr-2 transition-transform group-hover:-translate-x-1" /> Back to Docs
1825 </ Link >
1926 </ nav >
20- < API
27+ < OpenAPi
2128 apiDescriptionUrl = "./openapi/openapi.Sourcegraph.Latest.yaml"
2229 router = "hash"
2330 />
2431 </ div >
2532)
2633
27- export default OpenAPi
34+ export default OpenApiPage
You can’t perform that action at this time.
0 commit comments