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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user