mirror of
https://github.com/jordienr/zenblog.git
synced 2026-09-28 01:56:07 -04:00
fix build
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
"use client";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
const Docs = () => {
|
||||
const router = useRouter();
|
||||
router.push("/docs/getting-started");
|
||||
redirect("/docs/getting-started");
|
||||
};
|
||||
|
||||
export default Docs;
|
||||
|
||||
@@ -10,7 +10,6 @@ const Demo = (props: Props) => {
|
||||
<div className="m-2 w-full rounded-lg border">
|
||||
<div className="max-h-[700px] overflow-hidden rounded-b-md bg-white">
|
||||
<ZendoEditor
|
||||
onDelete={() => {}}
|
||||
onSave={() => {
|
||||
console.log("saved");
|
||||
}}
|
||||
|
||||
@@ -8,11 +8,8 @@ const Dialog = DialogPrimitive.Root;
|
||||
|
||||
const DialogTrigger = DialogPrimitive.Trigger;
|
||||
|
||||
const DialogPortal = ({
|
||||
className,
|
||||
...props
|
||||
}: DialogPrimitive.DialogPortalProps) => (
|
||||
<DialogPrimitive.Portal className={cn(className)} {...props} />
|
||||
const DialogPortal = ({ ...props }: DialogPrimitive.DialogPortalProps) => (
|
||||
<DialogPrimitive.Portal {...props} />
|
||||
);
|
||||
DialogPortal.displayName = DialogPrimitive.Portal.displayName;
|
||||
|
||||
@@ -40,7 +37,7 @@ const DialogContent = React.forwardRef<
|
||||
<DialogPrimitive.Content
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-[50%] top-[50%] z-50 grid max-h-[90vh] w-full max-w-4xl translate-x-[-50%] translate-y-[-50%] gap-4 overflow-auto border border-slate-200 bg-white px-3 py-2 shadow-lg duration-200 dark:border-slate-800 dark:bg-slate-950 sm:rounded-lg md:w-full",
|
||||
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-[50%] top-[50%] z-50 grid max-h-[90vh] w-full max-w-4xl translate-x-[-50%] translate-y-[-50%] gap-4 overflow-auto border border-slate-200 bg-white px-3 py-2 shadow-lg duration-200 sm:rounded-lg md:w-full dark:border-slate-800 dark:bg-slate-950",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -87,7 +87,6 @@ export default function CreatePost() {
|
||||
console.error(error);
|
||||
}
|
||||
}}
|
||||
onDelete={() => {}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -150,8 +150,7 @@ export default function Post() {
|
||||
console.error(error);
|
||||
}
|
||||
}}
|
||||
onDelete={() => {}}
|
||||
post={post}
|
||||
post={post as any} // TODO: rm any
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
export type Json =
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| null
|
||||
| { [key: string]: Json | undefined }
|
||||
| Json[]
|
||||
|
||||
export type Database = {
|
||||
public: {
|
||||
Tables: {
|
||||
blogs: {
|
||||
Row: {
|
||||
created_at: string
|
||||
description: string | null
|
||||
emoji: string
|
||||
id: string
|
||||
public_id: string
|
||||
title: string
|
||||
user_id: string
|
||||
}
|
||||
Insert: {
|
||||
created_at?: string
|
||||
description?: string | null
|
||||
emoji: string
|
||||
id?: string
|
||||
public_id?: string
|
||||
title: string
|
||||
user_id?: string
|
||||
}
|
||||
Update: {
|
||||
created_at?: string
|
||||
description?: string | null
|
||||
emoji?: string
|
||||
id?: string
|
||||
public_id?: string
|
||||
title?: string
|
||||
user_id?: string
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
homepage_signup: {
|
||||
Row: {
|
||||
created_at: string | null
|
||||
email: string
|
||||
id: number
|
||||
name: string
|
||||
}
|
||||
Insert: {
|
||||
created_at?: string | null
|
||||
email: string
|
||||
id?: number
|
||||
name: string
|
||||
}
|
||||
Update: {
|
||||
created_at?: string | null
|
||||
email?: string
|
||||
id?: number
|
||||
name?: string
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
invitations: {
|
||||
Row: {
|
||||
blog_id: string
|
||||
created_at: string
|
||||
email: string
|
||||
id: string
|
||||
name: string
|
||||
}
|
||||
Insert: {
|
||||
blog_id: string
|
||||
created_at?: string
|
||||
email: string
|
||||
id?: string
|
||||
name: string
|
||||
}
|
||||
Update: {
|
||||
blog_id?: string
|
||||
created_at?: string
|
||||
email?: string
|
||||
id?: string
|
||||
name?: string
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "invitations_blog_id_fkey"
|
||||
columns: ["blog_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "blogs"
|
||||
referencedColumns: ["id"]
|
||||
}
|
||||
]
|
||||
}
|
||||
members: {
|
||||
Row: {
|
||||
blog_id: string
|
||||
created_at: string
|
||||
id: number
|
||||
user_id: string
|
||||
}
|
||||
Insert: {
|
||||
blog_id: string
|
||||
created_at?: string
|
||||
id?: number
|
||||
user_id: string
|
||||
}
|
||||
Update: {
|
||||
blog_id?: string
|
||||
created_at?: string
|
||||
id?: number
|
||||
user_id?: string
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "members_blog_id_fkey"
|
||||
columns: ["blog_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "blogs"
|
||||
referencedColumns: ["id"]
|
||||
}
|
||||
]
|
||||
}
|
||||
posts: {
|
||||
Row: {
|
||||
blog_id: string
|
||||
content: Json
|
||||
cover_image: string | null
|
||||
created_at: string
|
||||
id: string
|
||||
metadata: Json[] | null
|
||||
published: boolean
|
||||
slug: string
|
||||
title: string
|
||||
updated_at: string
|
||||
user_id: string
|
||||
}
|
||||
Insert: {
|
||||
blog_id: string
|
||||
content?: Json
|
||||
cover_image?: string | null
|
||||
created_at?: string
|
||||
id?: string
|
||||
metadata?: Json[] | null
|
||||
published?: boolean
|
||||
slug: string
|
||||
title: string
|
||||
updated_at?: string
|
||||
user_id?: string
|
||||
}
|
||||
Update: {
|
||||
blog_id?: string
|
||||
content?: Json
|
||||
cover_image?: string | null
|
||||
created_at?: string
|
||||
id?: string
|
||||
metadata?: Json[] | null
|
||||
published?: boolean
|
||||
slug?: string
|
||||
title?: string
|
||||
updated_at?: string
|
||||
user_id?: string
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "posts_blog_id_fkey"
|
||||
columns: ["blog_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "blogs"
|
||||
referencedColumns: ["id"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Views: {
|
||||
[_ in never]: never
|
||||
}
|
||||
Functions: {
|
||||
generate_slug: {
|
||||
Args: {
|
||||
title: string
|
||||
}
|
||||
Returns: string
|
||||
}
|
||||
requesting_user_id: {
|
||||
Args: Record<PropertyKey, never>
|
||||
Returns: string
|
||||
}
|
||||
}
|
||||
Enums: {
|
||||
[_ in never]: never
|
||||
}
|
||||
CompositeTypes: {
|
||||
[_ in never]: never
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type Tables<
|
||||
PublicTableNameOrOptions extends
|
||||
| keyof (Database["public"]["Tables"] & Database["public"]["Views"])
|
||||
| { schema: keyof Database },
|
||||
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
||||
Database[PublicTableNameOrOptions["schema"]]["Views"])
|
||||
: never = never
|
||||
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
||||
Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
||||
Row: infer R
|
||||
}
|
||||
? R
|
||||
: never
|
||||
: PublicTableNameOrOptions extends keyof (Database["public"]["Tables"] &
|
||||
Database["public"]["Views"])
|
||||
? (Database["public"]["Tables"] &
|
||||
Database["public"]["Views"])[PublicTableNameOrOptions] extends {
|
||||
Row: infer R
|
||||
}
|
||||
? R
|
||||
: never
|
||||
: never
|
||||
|
||||
export type TablesInsert<
|
||||
PublicTableNameOrOptions extends
|
||||
| keyof Database["public"]["Tables"]
|
||||
| { schema: keyof Database },
|
||||
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
||||
: never = never
|
||||
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
||||
Insert: infer I
|
||||
}
|
||||
? I
|
||||
: never
|
||||
: PublicTableNameOrOptions extends keyof Database["public"]["Tables"]
|
||||
? Database["public"]["Tables"][PublicTableNameOrOptions] extends {
|
||||
Insert: infer I
|
||||
}
|
||||
? I
|
||||
: never
|
||||
: never
|
||||
|
||||
export type TablesUpdate<
|
||||
PublicTableNameOrOptions extends
|
||||
| keyof Database["public"]["Tables"]
|
||||
| { schema: keyof Database },
|
||||
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
||||
: never = never
|
||||
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
||||
Update: infer U
|
||||
}
|
||||
? U
|
||||
: never
|
||||
: PublicTableNameOrOptions extends keyof Database["public"]["Tables"]
|
||||
? Database["public"]["Tables"][PublicTableNameOrOptions] extends {
|
||||
Update: infer U
|
||||
}
|
||||
? U
|
||||
: never
|
||||
: never
|
||||
|
||||
export type Enums<
|
||||
PublicEnumNameOrOptions extends
|
||||
| keyof Database["public"]["Enums"]
|
||||
| { schema: keyof Database },
|
||||
EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
|
||||
? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
|
||||
: never = never
|
||||
> = PublicEnumNameOrOptions extends { schema: keyof Database }
|
||||
? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
|
||||
: PublicEnumNameOrOptions extends keyof Database["public"]["Enums"]
|
||||
? Database["public"]["Enums"][PublicEnumNameOrOptions]
|
||||
: never
|
||||
|
||||
Reference in New Issue
Block a user