Make sonar happier (#9114)

* Make sonar happier

* Rename method
This commit is contained in:
Michael Telatynski 2022-07-29 12:01:15 +01:00 committed by GitHub
parent 6a8dd23d29
commit 45f6c32eb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 23 deletions

View file

@ -32,9 +32,9 @@ const TIMEOUT = 1500;
export function UseCaseSelection({ onFinished }: Props) {
const [selection, setSelected] = useState<UseCase | null>(null);
// Call onFinished 1.5s after `selection` becomes truthy, to give time for the animation to run
useEffect(() => {
if (selection) {
setSelected(selection);
let handler: number | null = setTimeout(() => {
handler = null;
onFinished(selection);