mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 22:27:16 +01:00
Fixed update notice.
This commit is contained in:
parent
68ffa823f8
commit
5b7cfe83b4
2 changed files with 7 additions and 4 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { useEffect, useCallback, useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { Button, Row, Column } from 'react-basics';
|
||||
import { setItem } from 'next-basics';
|
||||
import useStore, { checkVersion } from 'store/version';
|
||||
|
|
@ -44,7 +45,7 @@ export function UpdateNotice({ user, config }) {
|
|||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
return createPortal(
|
||||
<Row className={styles.notice}>
|
||||
<Column variant="two" className={styles.message}>
|
||||
{formatMessage(messages.newVersionAvailable, { version: `v${latest}` })}
|
||||
|
|
@ -55,7 +56,8 @@ export function UpdateNotice({ user, config }) {
|
|||
</Button>
|
||||
<Button onClick={handleDismissClick}>{formatMessage(labels.dismiss)}</Button>
|
||||
</Column>
|
||||
</Row>
|
||||
</Row>,
|
||||
document.body,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue