mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +01:00
Typescript conversion.
This commit is contained in:
parent
366ef35d3d
commit
8775d696b8
29 changed files with 74 additions and 57 deletions
11
src/components/hooks/useForceUpdate.ts
Normal file
11
src/components/hooks/useForceUpdate.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { useCallback, useState } from 'react';
|
||||
|
||||
export function useForceUpdate() {
|
||||
const [, update] = useState(Object.create(null));
|
||||
|
||||
return useCallback(() => {
|
||||
update(Object.create(null));
|
||||
}, [update]);
|
||||
}
|
||||
|
||||
export default useForceUpdate;
|
||||
Loading…
Add table
Add a link
Reference in a new issue