* Remove unneeded code. * Remove more unused code. * Update knip.jsonc for ui-library. * Remove unneeded imports. Change the registry generation to only generate what's needed. * Cleanup the rehype middleware (it wasn't used). Clean up the example blocks generation. * Don't show the "show code" button in all dropzone examples.
22 lines
594 B
TypeScript
22 lines
594 B
TypeScript
'use client'
|
|
|
|
import { OpenInV0Button } from '@/components/open-in-v0-button'
|
|
|
|
import dynamic from 'next/dynamic'
|
|
|
|
//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) => {
|
|
return (
|
|
<div className="mt-4">
|
|
<Command name={name} highlight />
|
|
<OpenInV0Button name={name} className="w-fit shrink-0 mt-4" />
|
|
</div>
|
|
)
|
|
}
|