diff --git a/src/app/components/Settings/SettingsButtons.tsx b/src/app/components/Settings/SettingsButtons.tsx index 58eb14e..bad05db 100644 --- a/src/app/components/Settings/SettingsButtons.tsx +++ b/src/app/components/Settings/SettingsButtons.tsx @@ -83,6 +83,26 @@ export const SettingsButton = () => { window.location.reload(); }; + const handleRefreshESI = async () => { + try { + const response = await fetch("/api/refresh", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ force: true }) + }); + + if (response.ok) { + console.log("✅ ESI data refreshed successfully"); + // Optionally reload the page to show fresh data + window.location.reload(); + } else { + console.error("❌ Failed to refresh ESI data"); + } + } catch (error) { + console.error("❌ Error refreshing ESI data:", error); + } + }; + return ( <> @@ -128,6 +148,14 @@ export const SettingsButton = () => { Data Refresh +