fix comment page.

This commit is contained in:
2025-07-14 12:38:05 +08:00
parent 0ef8e14587
commit 3336f7794f

View File

@@ -32,6 +32,11 @@ export default function CommentPage() {
});
return;
}
const preFetchData = app.getPreFetchData();
if (preFetchData?.comment?.id === id) {
setComment(preFetchData.comment);
return;
}
network.getComment(id).then((res) => {
if (res.success) {
setComment(res.data!);
@@ -54,11 +59,6 @@ export default function CommentPage() {
});
return;
}
const preFetchData = app.getPreFetchData();
if (preFetchData?.comment?.id === id) {
setComment(preFetchData.comment);
return;
}
network.getComment(id).then((res) => {
if (res.success) {
setComment(res.data!);