0.0.1.2
This commit is contained in:
@@ -28,9 +28,18 @@ export function FamilyTreesList() {
|
||||
|
||||
useEffect(() => {
|
||||
if (session?.user?.id) {
|
||||
console.log('📋 开始获取家族树列表...')
|
||||
fetch('/api/trees')
|
||||
.then(res => res.json())
|
||||
.then(res => {
|
||||
console.log('📋 家族树列表响应状态:', res.status)
|
||||
return res.json()
|
||||
})
|
||||
.then(data => {
|
||||
console.log('📋 家族树列表数据:', {
|
||||
data,
|
||||
treesCount: data.trees?.length,
|
||||
trees: data.trees
|
||||
})
|
||||
if (data.trees) {
|
||||
setTrees(data.trees)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user