Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 24 additions & 20 deletions src/components/landing/LandingCodeExampleCard.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,33 @@ export function LandingCodeExampleCard({
return (
<div className="px-4 space-y-4 flex flex-col items-center">
<div className="text-3xl font-black">{title}</div>
<Tabs tabs={tabs}>
{frameworks.map((framework) => {
const example = codeByFramework[framework]
<div className="max-w-full min-w-0">
<Tabs tabs={tabs}>
{frameworks.map((framework) => {
const example = codeByFramework[framework]

if (!example) {
return (
<div key={framework}>
{renderFallback ? renderFallback(framework) : null}
</div>
)
}

if (!example) {
return (
<div key={framework}>
{renderFallback ? renderFallback(framework) : null}
</div>
<CodeBlock
key={framework}
className="mt-0 border-0"
showTypeCopyButton={false}
>
<code className={`language-${example.lang}`}>
{example.code}
</code>
</CodeBlock>
)
}

return (
<CodeBlock
key={framework}
className="mt-0 border-0"
showTypeCopyButton={false}
>
<code className={`language-${example.lang}`}>{example.code}</code>
</CodeBlock>
)
})}
</Tabs>
})}
</Tabs>
</div>
</div>
)
}
Loading