From 68842dbea2a0c57cb92b75aae6284bbbb7419a7d Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Mon, 2 Mar 2026 22:18:57 +0000 Subject: [PATCH] comments view --- .../components/comment-list-with-tabs.tsx | 114 ++++++++---------- 1 file changed, 52 insertions(+), 62 deletions(-) diff --git a/apps/client/src/features/comment/components/comment-list-with-tabs.tsx b/apps/client/src/features/comment/components/comment-list-with-tabs.tsx index 70d3107f..92413b75 100644 --- a/apps/client/src/features/comment/components/comment-list-with-tabs.tsx +++ b/apps/client/src/features/comment/components/comment-list-with-tabs.tsx @@ -1,6 +1,17 @@ import React, { useState, useRef, useCallback, memo, useMemo } from "react"; import { useParams } from "react-router-dom"; -import { ActionIcon, Center, Divider, Group, Paper, Stack, Tabs, Badge, Text, ScrollArea } from "@mantine/core"; +import { + ActionIcon, + Center, + Divider, + Group, + Paper, + Stack, + Tabs, + Badge, + Text, + ScrollArea, +} from "@mantine/core"; import CommentListItem from "@/features/comment/components/comment-list-item"; import { useCommentsQuery, @@ -29,7 +40,6 @@ function CommentListWithTabs() { } = useCommentsQuery({ pageId: page?.id }); const createCommentMutation = useCreateCommentMutation(); const [isLoading, setIsLoading] = useState(false); - const isCloudEE = useIsCloudEE(); const { data: space } = useGetSpaceBySlugQuery(page?.space?.slug); const canComment = page?.permissions?.canEdit ?? false; @@ -68,7 +78,10 @@ function CommentListWithTabs() { setTimeout(() => { const selector = `div[data-comment-id="${createdComment.id}"]`; const commentElement = document.querySelector(selector); - commentElement?.scrollIntoView({ behavior: "smooth", block: "center" }); + commentElement?.scrollIntoView({ + behavior: "smooth", + block: "center", + }); }, 400); } catch (error) { console.error("Failed to post comment:", error); @@ -158,59 +171,6 @@ function CommentListWithTabs() { /> ) : null; - // If not cloud/enterprise, show simple list without tabs - if (!isCloudEE) { - return ( -