mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 21:24:11 +00:00
4c88f90a15
* feat: add lock icon when param `locked=true` * chore: move `isViewLocked` logic up the component tree * chore: remove extra container from lock icon * chore: move fading logic into separate hook * chore: move locked icon into separate component * chore: rename variables
16 lines
497 B
TypeScript
16 lines
497 B
TypeScript
import { IoLockClosedOutline } from '@react-icons/all-files/io5/IoLockClosedOutline';
|
|
|
|
import { useFadeOutOnInactivity } from '../../../common/hooks/useFadeOutOnInactivity';
|
|
|
|
import style from './NavigationMenu.module.scss';
|
|
|
|
export default function ViewLockedIcon() {
|
|
const isLockIconShown = useFadeOutOnInactivity();
|
|
|
|
return (
|
|
<div className={`${style.buttonContainer} ${!isLockIconShown ? style.hidden : ''}`}>
|
|
<IoLockClosedOutline className={style.lockIcon} />
|
|
</div>
|
|
);
|
|
}
|