mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
fix comment page.
This commit is contained in:
@@ -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!);
|
||||
|
Reference in New Issue
Block a user