add loading all page & change bugs

This commit is contained in:
Ehsan
2024-09-05 22:20:18 +03:30
parent 087ed4a818
commit c45a161fcb
72 changed files with 1208 additions and 661 deletions
+3 -3
View File
@@ -2,21 +2,21 @@
import { useState } from 'react';
import ItemUser from './ItemUser'
function Comment({ data }) {
function Comment({ data, loading }) {
const [list, setList] = useState(data.comments);
const [update, setUpdate] = useState(false);
return (
<ul className={`flex flex-col !pl-2.5 justify-start max-h-[492px] overflow-auto items-start gap-12 mt-2 ${false && 'w-full'}`}>
<ul className={`flex flex-col comment-list !pl-2.5 justify-start max-h-[492px] overflow-auto items-start gap-12 mt-2 ${false && 'w-full'}`}>
{data && !!data.comments.length && data.comments.map((item, idx) => (
<ItemUser
key={idx}
list={list}
data={item}
update={update}
loading={false}
setList={setList}
loading={loading}
setUpdate={setUpdate}
/>
))}