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

This commit is contained in:
Hugo Häggmark 2021-10-27 07:11:24 +02:00 committed by GitHub
parent 24a74cd06e
commit fadf72dd34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}