mirror of
https://github.com/community-scripts/Proxmox.git
synced 2026-04-22 21:43:43 -05:00
added support for getting scripts from cache
This commit is contained in:
@@ -50,7 +50,12 @@ export default function Page() {
|
||||
throw new Error("Empty response");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error fetching links from pb:", error);
|
||||
const cachedLinks = localStorage.getItem("scripts");
|
||||
if (cachedLinks) {
|
||||
res = JSON.parse(cachedLinks);
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
res = res.sort((a: Category, b: Category) => {
|
||||
|
||||
Reference in New Issue
Block a user