mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 13:49:09 +03:00
* Bump nextjs in the ui-library. * Bump the nextjs in design-system. * Bump nextjs to v15 in www. * Bump the next version in the pnpm catalog. * Switch all apps to using the catalog version of next. * Fix ui-lib and design-system to build with next 15. * Fix some prettier errors. * Bump the next-eslint package. * Fix a lint issue about a component starting with underscore. * Use the catalog version of next in cms app. * Disable turbo for dev command in www. Remove obsolete experimental flags. * Return some of the experimental flags.
30 lines
881 B
TypeScript
30 lines
881 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>
|
|
)
|
|
}
|
|
|
|
export const BlockItemPreview = ({ title, src }: { title: string; src: string }) => {
|
|
return (
|
|
<div className="flex items-center justify-center relative border rounded-lg">
|
|
<iframe src={src} className="w-full h-[600px] border-0 rounded-md" title={title} />
|
|
</div>
|
|
)
|
|
}
|