get data with filter location for first time, get comment of doctor and show in doctor page, handle new comment

This commit is contained in:
Ehsan
2025-09-03 22:05:26 +03:30
parent 6920e4078b
commit ebfe47468c
14 changed files with 187 additions and 50 deletions
+4 -4
View File
@@ -2,7 +2,7 @@
import { useState } from "react";
import ItemUser from "./ItemUser";
function Comment({ data }) {
function Comment({ data, comments }) {
const [list, setList] = useState(data?.comments);
const [update, setUpdate] = useState(false);
@@ -12,9 +12,9 @@ function Comment({ data }) {
false && "w-full"
}`}
>
{data &&
!!data?.comments?.length &&
data?.comments.map((item, idx) => (
{comments &&
comments.length &&
comments.map((item, idx) => (
<ItemUser
key={idx}
list={list}