- Rename all DB tables: properties → projects, properties_addresses → projects_addresses, properties_models → projects_models, property_likes → projects_likes - Add projects_likes as proper Drizzle schema table (was SQL-only before) - Rename ID prefixes: property_xxx → project_xxx - Rename auth_sessions column: active_property_id → active_project_id - Simplify project creation: address is now optional (no longer required to get started) - Update all actions, stores, types, components, and routes - Rename route: /editor/[propertyId] → /editor/[projectId] - Add SQL migration for table/column/index/policy/function renames - Update RPC functions: increment_project_views, get_project_like_count - Update storage bucket reference: project-thumbnails - All types/exports follow existing Drizzle patterns (pgTable, relations, zod schemas)
20 lines
492 B
TypeScript
20 lines
492 B
TypeScript
'use client'
|
|
|
|
import { Plus } from 'lucide-react'
|
|
|
|
interface CreateProjectButtonProps {
|
|
onCreateProject: () => void
|
|
}
|
|
|
|
export function CreateProjectButton({ onCreateProject }: CreateProjectButtonProps) {
|
|
return (
|
|
<button
|
|
onClick={onCreateProject}
|
|
className="flex items-center gap-2 rounded-lg bg-primary px-4 py-2 text-primary-foreground hover:bg-primary/90 transition-colors"
|
|
>
|
|
<Plus className="w-4 h-4" />
|
|
<span>Create Project</span>
|
|
</button>
|
|
)
|
|
}
|