mirror of
https://github.com/luminous-devs/lume.git
synced 2024-10-04 02:40:47 +00:00
add toast message
This commit is contained in:
parent
a1d22c1daf
commit
1929ceb72d
@ -3,6 +3,7 @@ import { relaunch } from '@tauri-apps/plugin-process';
|
||||
import { Update, check } from '@tauri-apps/plugin-updater';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
export function AboutScreen() {
|
||||
const [version, setVersion] = useState('');
|
||||
@ -10,7 +11,8 @@ export function AboutScreen() {
|
||||
|
||||
const checkUpdate = async () => {
|
||||
const update = await check();
|
||||
if (update) setNewUpdate(update);
|
||||
if (!update) toast.info('There is no update available');
|
||||
setNewUpdate(update);
|
||||
};
|
||||
|
||||
const installUpdate = async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user