mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 20:27:23 +00:00
fix: ensure loading state is updated in KunFiles component when API is unavailable
This commit is contained in:
@@ -1463,6 +1463,7 @@ function KunFiles({ resource }: { resource: ResourceDetails }) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!vnid || !KunApi.isAvailable()) {
|
if (!vnid || !KunApi.isAvailable()) {
|
||||||
|
setLoading(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
KunApi.getPatch(vnid).then((res) => {
|
KunApi.getPatch(vnid).then((res) => {
|
||||||
|
Reference in New Issue
Block a user