Fix version check.
This commit is contained in:
1 parent
b35c5b57da
commit
48a1994219
2 files changed
+8
-7
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user