improvements

- stage manager sees timer with negative values
- time up only shows if timer has been running
- use spacebar to toggle navbar
- pip shows times with delays
improve iterate
This commit is contained in:
cv
2021-05-10 23:21:06 +02:00
parent bd677163ed
commit 5449aee0b0
5 changed files with 50 additions and 15 deletions
+14 -1
View File
@@ -1,7 +1,8 @@
import { Link, Redirect } from 'react-router-dom';
import { Image } from '@chakra-ui/react';
import { AnimatePresence, motion } from 'framer-motion';
import { useState } from 'react';
import { useState, useEffect } from 'react';
import tinykeys from 'tinykeys';
import navlogo from '../../../assets/images/logos/LOGO-72.png';
import style from './NavLogo.module.css';
@@ -12,6 +13,18 @@ export default function NavLogo() {
setShowNav(!showNav);
};
// Handle keyboard shortcuts
useEffect(() => {
let unsubscribe = tinykeys(window, {
Space: () => {
setShowNav((s) => !s);
},
});
return () => {
unsubscribe();
};
}, []);
return (
<motion.div
initial={{ opacity: 0.5 }}