feat: enable recursive comment threading up to 3 levels deep
This commit is contained in:
@@ -14,6 +14,8 @@ import { useSession } from "@/lib/auth-client"
|
|||||||
import { TiptapRenderer } from "@/components/tiptap-renderer"
|
import { TiptapRenderer } from "@/components/tiptap-renderer"
|
||||||
import { TiptapEditor } from "@/components/tiptap-editor"
|
import { TiptapEditor } from "@/components/tiptap-editor"
|
||||||
|
|
||||||
|
const MAX_DEPTH = 3
|
||||||
|
|
||||||
export interface CommentData {
|
export interface CommentData {
|
||||||
id: string
|
id: string
|
||||||
gameId: string
|
gameId: string
|
||||||
@@ -40,8 +42,6 @@ function getInitial(name: string | null | undefined): string {
|
|||||||
return name?.charAt(0)?.toUpperCase() || "?"
|
return name?.charAt(0)?.toUpperCase() || "?"
|
||||||
}
|
}
|
||||||
|
|
||||||
const MAX_DEPTH = 3
|
|
||||||
|
|
||||||
interface CommentItemProps {
|
interface CommentItemProps {
|
||||||
comment: CommentData
|
comment: CommentData
|
||||||
depth?: number
|
depth?: number
|
||||||
|
|||||||
Reference in New Issue
Block a user