mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Fix version check.
This commit is contained in:
parent
b35c5b57da
commit
48a1994219
2 changed files with 8 additions and 7 deletions
|
|
@ -7,21 +7,21 @@ import Button from './Button';
|
|||
import useForceUpdate from '../../hooks/useForceUpdate';
|
||||
|
||||
export default function UpdateNotice() {
|
||||
const forceUpdte = useForceUpdate();
|
||||
const { hasUpdate, latest, updateCheck } = useVersion(true);
|
||||
const forceUpdate = useForceUpdate();
|
||||
const { hasUpdate, checked, latest, updateCheck } = useVersion(true);
|
||||
|
||||
function handleViewClick() {
|
||||
location.href = 'https://github.com/mikecao/umami/releases';
|
||||
updateCheck();
|
||||
forceUpdte();
|
||||
forceUpdate();
|
||||
}
|
||||
|
||||
function handleDismissClick() {
|
||||
updateCheck();
|
||||
forceUpdte();
|
||||
forceUpdate();
|
||||
}
|
||||
|
||||
if (!hasUpdate) {
|
||||
if (!hasUpdate || checked) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue