add toast message

This commit is contained in:
reya 2023-11-22 08:31:58 +07:00
parent a1d22c1daf
commit 1929ceb72d
1 changed files with 3 additions and 1 deletions

View File

@ -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 () => {