DashboardLinks: Fix time in links not being updated (#40934) (#40969)

(cherry picked from commit fadf72dd34)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2021-10-27 07:45:34 +02:00
committed by GitHub
co-authored by Hugo Häggmark
parent 28f85570a1
commit 808ffb0d51
@@ -2,6 +2,6 @@ import { useState } from 'react';
/** @internal */
export function useForceUpdate() {
const [value, setValue] = useState(0); // integer state
return () => setValue(value + 1); // update the state to force render
const [_, setValue] = useState(0); // integer state
return () => setValue((prevState) => prevState + 1); // update the state to force render
}