Skip to content

Commit c582514

Browse files
committed
Update HomePage.tsx
1 parent b49950f commit c582514

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

website/src/pages/HomePage.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
Languages,
88
} from 'lucide-react';
99
import type { Locale } from '../i18n';
10+
import { OpenAPIDesigner, createPetStoreDocument } from '@/app/components/openapi-designer';
1011

1112
const 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>

0 commit comments

Comments
 (0)