Add function to fetch the newest version of the app & also a popup.

This commit is contained in:
yuanhau 2025-06-17 16:18:17 +08:00
parent a000a080ed
commit 804694f74c
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,10 @@
import currentVersion from "~/versionTag";
export default async function newestVersion() {
const current = currentVersion();
const req = await fetch("/api/version");
const res = await req.json();
if (current !== res.version) {
return false;
}
return true;
}