File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- import { useEffect , useState } from "react" ;
1+ import { useCallback , useEffect , useState } from "react" ;
22import { useHealth } from "src/hooks" ;
33import { T } from "src/locale" ;
44
@@ -24,13 +24,13 @@ export function SiteFooter() {
2424 const [ latestVersion , setLatestVersion ] = useState < string | null > ( null ) ;
2525 const [ isNewVersionAvailable , setIsNewVersionAvailable ] = useState ( false ) ;
2626
27- const getVersion = ( ) => {
27+ const getVersion = useCallback ( ( ) => {
2828 if ( ! health . data ) {
2929 return "" ;
3030 }
3131 const v = health . data . version ;
3232 return `v${ v . major } .${ v . minor } .${ v . revision } ` ;
33- } ;
33+ } , [ health . data ] ) ;
3434
3535 useEffect ( ( ) => {
3636 const checkForUpdates = async ( ) => {
@@ -56,7 +56,7 @@ export function SiteFooter() {
5656 if ( health . data ) {
5757 checkForUpdates ( ) ;
5858 }
59- } , [ health . data ] ) ;
59+ } , [ health . data , getVersion ] ) ;
6060
6161 return (
6262 < footer className = "footer d-print-none py-3" >
You can’t perform that action at this time.
0 commit comments