useEffect(() => {
    let timeout: NodeJS.Timeout;
    if (spinning === true) {
      timeout = setTimeout(() => {
        setSpinning(false);