Files
supabase/apps/ui-library/components/block-item.tsx
Ivan Vasilov 1cd1ebfc7f chire: Sort imports in all packages, cms, design-system and ui-library apps (#41610)
Sorted all imports in all packages, `cms`, `design-system` and
`ui-library` apps by running `pnpm format` on them.

All changes in this PR are done by the script.
2026-02-05 13:54:10 +01:00

24 lines
703 B
TypeScript

'use client'
import dynamic from 'next/dynamic'
import { OpenInV0Button } from '@/components/open-in-v0-button'
//The dynamic import is to prevent the command component from being rendered on the server and cause hydration errors
const Command = dynamic(() => import('./command').then((mod) => mod.Command), { ssr: false })
interface BlockItemProps {
name: string
}
export const BlockItem = ({ name }: BlockItemProps) => {
const framework = name.includes('vue') || name.includes('nuxtjs') ? 'vue' : 'react'
return (
<div className="mt-4">
<Command name={name} highlight framework={framework} />
<OpenInV0Button name={name} className="w-fit shrink-0 mt-4" />
</div>
)
}