This commit is contained in:
Viktor Rådberg
2024-01-13 20:15:43 +01:00
parent f8f0788b97
commit 2f3ee74c74
2 changed files with 6 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
name: Deploy to Firebase Hosting name: Deploy to Firebase Hosting
'on': 'on':
push: push:
branches:
- main
tags: tags:
- '*' - '*'
jobs: jobs:

View File

@@ -44,17 +44,19 @@ export const SettingsModal = ({ isOpen, closeModal }: SettingsModalProps) => {
const data = await result.json(); const data = await result.json();
if (!data.name) { if (!data.name) {
setIsLatestVersion(false);
setNewVersion(undefined); setNewVersion(undefined);
setIsLatestVersion(false);
return; return;
} }
setNewVersion(data.name);
/* @ts-expect-error is defined in vite.config.ts*/ /* @ts-expect-error is defined in vite.config.ts*/
if (data.name === APP_VERSION) { if (data.name === APP_VERSION) {
setNewVersion(data.name);
setIsLatestVersion(true); setIsLatestVersion(true);
return; return;
} }
setIsLatestVersion(false); setIsLatestVersion(false);
} catch (error) { } catch (error) {
console.error('error getting latest version string', error); console.error('error getting latest version string', error);