fix(web): miscellaneous improvements (#416)

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
This commit is contained in:
waru
2025-07-22 21:25:24 -05:00
committed by GitHub
parent bd54f01ac1
commit 2543c5317b
15 changed files with 22 additions and 6 deletions

View File

@@ -12,11 +12,12 @@ const NpmPackage = () => {
setVersionLoading(true);
try {
const res = await fetch(
"https://registry.npmjs.org/create-better-t-stack/latest",
"https://api.github.com/repos/AmanVarshney01/create-better-t-stack/releases",
);
if (!res.ok) throw new Error("Failed to fetch version");
const data = await res.json();
setVersion(data.version);
const latestVersion = data[0].tag_name.split("@")[1];
setVersion(latestVersion);
} catch (error) {
console.error("Error fetching NPM version:", error);
setVersion("?.?.?");