File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 Languages ,
88} from 'lucide-react' ;
99import type { Locale } from '../i18n' ;
10+ import { OpenAPIDesigner , createPetStoreDocument } from '@/app/components/openapi-designer' ;
1011
1112const text = ( locale : Locale ) =>
1213 locale === 'zh'
@@ -129,15 +130,13 @@ export default function HomePage({ locale }: { locale: Locale }) {
129130 < span className = "h-3 w-3 rounded-full bg-green-400" />
130131 < span className = "ml-3 text-xs text-muted-foreground font-mono" > OpenAPI Designer</ span >
131132 </ div >
132- < div className = "flex items-center justify-center bg-[#1e1e2e] text-gray-400 h-80 sm:h-96" >
133- < div className = "text-center px-6" >
134- < Code2 className = "mx-auto mb-4 h-12 w-12 opacity-40" />
135- < p className = "text-sm opacity-60" >
136- { locale === 'zh'
137- ? '在此处嵌入 OpenAPI Designer 组件的实时演示'
138- : 'Embed a live OpenAPI Designer component demo here' }
139- </ p >
140- </ div >
133+ < div className = "h-[min(72vh,880px)] min-h-[480px] bg-background" >
134+ < OpenAPIDesigner
135+ key = { locale }
136+ initialDocument = { createPetStoreDocument ( ) }
137+ defaultLocale = { locale }
138+ className = "h-full"
139+ />
141140 </ div >
142141 </ div >
143142 </ section >
You can’t perform that action at this time.
0 commit comments