🚑 Hotfix errors

This commit is contained in:
ajnart
2022-06-03 14:10:38 +02:00
parent 44a7df5ae0
commit bdaf70f26b

View File

@@ -39,7 +39,7 @@ export function Footer({ links }: FooterCenteredProps) {
// Fetch Data here when component first mounted // Fetch Data here when component first mounted
fetch(`https://api.github.com/repos/${REPO_URL}/releases/latest`).then((res) => { fetch(`https://api.github.com/repos/${REPO_URL}/releases/latest`).then((res) => {
res.json().then((data) => { res.json().then((data) => {
if (data.tag_name >= CURRENT_VERSION) { if (data.tag_name > CURRENT_VERSION) {
showNotification({ showNotification({
color: 'yellow', color: 'yellow',
autoClose: false, autoClose: false,
@@ -47,13 +47,12 @@ export function Footer({ links }: FooterCenteredProps) {
icon: <AlertCircle />, icon: <AlertCircle />,
message: `Version ${data.tag_name} is available, update now!`, message: `Version ${data.tag_name} is available, update now!`,
}); });
} else if (data.tag_name <= CURRENT_VERSION) { } else if (data.tag_name < CURRENT_VERSION) {
showNotification({ showNotification({
color: 'orange', color: 'orange',
autoClose: 5000, autoClose: 5000,
title: 'You are using a development version', title: 'You are using a development version',
icon: <AlertCircle />, icon: <AlertCircle />,
loading: true,
message: 'This version of Homarr is still in development! Bugs are expected 🐛', message: 'This version of Homarr is still in development! Bugs are expected 🐛',
}); });
} }