feat: check for updates

This commit is contained in:
Timothy J. Baek 2024-02-25 11:55:15 -08:00
parent 6bfe2a6306
commit 759883a4c8
8 changed files with 91 additions and 14 deletions

View file

@ -101,11 +101,10 @@ export const copyToClipboard = (text) => {
);
};
export const checkVersion = (required, current) => {
// Returns true when current version is below required
export const compareVersion = (latest, current) => {
return current === '0.0.0'
? false
: current.localeCompare(required, undefined, {
: current.localeCompare(latest, undefined, {
numeric: true,
sensitivity: 'case',
caseFirst: 'upper'