Files
zeekay afb155705a fix: Add 'use client' to all interactive blocks and fix registry structure
Fixed deployment issues for GitHub Pages static export:

Server Component Fixes:
- Added 'use client' to all login blocks (10 files)
- Added 'use client' to all signup blocks (10 files)
- Added 'use client' to all sidebar blocks (25 files)
- Added 'use client' to all OTP blocks (10 files)
- Fixed VersionSwitcher/SearchForm naming in sidebar-02

Registry Structure Fixes:
- Updated getRegistryItem() to use Index[style][name] pattern
- Updated getRegistryComponent() to accept style parameter
- Removed problematic Zod validation in blocks.ts
- Fixed null to undefined conversion in block metadata

Build Compatibility:
- Disabled Shiki syntax highlighting for static export
- Added HTML fallback for code blocks

Result: All 353 static pages now generate successfully
2025-10-18 22:59:23 -07:00

18 lines
3.6 KiB
JSON

{
"name": "signup-01",
"registryDependencies": [
"button",
"card",
"input",
"label"
],
"files": [
{
"name": "signup-01.tsx",
"content": "\"use client\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/registry/default/ui/card\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/default/ui/field\"\nimport { Input } from \"@/registry/default/ui/input\"\n\nfunction SignupForm({ ...props }: React.ComponentProps<typeof Card>) {\n const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n const formData = new FormData(e.currentTarget)\n\n // TODO: Add your authentication logic here\n console.log(\"Form submitted:\", Object.fromEntries(formData))\n\n // Example: await signIn(formData)\n }\n\n return (\n <Card {...props}>\n <CardHeader>\n <CardTitle>Create an account</CardTitle>\n <CardDescription>\n Enter your information below to create your account\n </CardDescription>\n </CardHeader>\n <CardContent>\n <form onSubmit={handleSubmit}>\n <FieldGroup>\n <Field>\n <FieldLabel htmlFor=\"name\">Full Name</FieldLabel>\n <Input\n id=\"name\"\n name=\"name\"\n type=\"text\"\n placeholder=\"John Doe\"\n required\n />\n </Field>\n <Field>\n <FieldLabel htmlFor=\"email\">Email</FieldLabel>\n <Input\n id=\"email\"\n name=\"email\"\n type=\"email\"\n placeholder=\"[email protected]\"\n required\n />\n <FieldDescription>\n We&apos;ll use this to contact you. We will not share your email\n with anyone else.\n </FieldDescription>\n </Field>\n <Field>\n <FieldLabel htmlFor=\"password\">Password</FieldLabel>\n <Input id=\"password\" name=\"password\" type=\"password\" required />\n <FieldDescription>\n Must be at least 8 characters long.\n </FieldDescription>\n </Field>\n <Field>\n <FieldLabel htmlFor=\"confirm-password\">\n Confirm Password\n </FieldLabel>\n <Input\n id=\"confirm-password\"\n name=\"confirm-password\"\n type=\"password\"\n required\n />\n <FieldDescription>Please confirm your password.</FieldDescription>\n </Field>\n <FieldGroup>\n <Field>\n <Button type=\"submit\">Create Account</Button>\n <Button variant=\"outline\" type=\"button\">\n Sign up with Google\n </Button>\n <FieldDescription className=\"px-6 text-center\">\n Already have an account? <a href=\"#\">Sign in</a>\n </FieldDescription>\n </Field>\n </FieldGroup>\n </FieldGroup>\n </form>\n </CardContent>\n </Card>\n )\n}\n\nexport default function Page() {\n return (\n <div className=\"flex min-h-svh w-full items-center justify-center p-6 md:p-10\">\n <div className=\"w-full max-w-sm\">\n <SignupForm />\n </div>\n </div>\n )\n}\n"
}
],
"type": "components:block",
"category": "Authentication",
"subcategory": "Signup"
}