diff --git a/src/components/EditTierModal.tsx b/src/components/EditTierModal.tsx index 6225d24..c52ff95 100644 --- a/src/components/EditTierModal.tsx +++ b/src/components/EditTierModal.tsx @@ -1,14 +1,19 @@ import { useEffect, useState } from 'react'; import { useShallow } from 'zustand/shallow'; import useStore from '../store'; - export const EditTierModal = () => { const [tierLevel, setTierLevel, editTierLevel] = useStore( useShallow(state => [state.editingTierLevel, state.setEditingTierLevel, state.editTierLevelName]), ); const [newName, setNewName] = useState(''); useEffect(() => { - if (tierLevel) setNewName(tierLevel.name); + if (tierLevel) { + setNewName(tierLevel.name); + document.body.style.overflow = 'hidden'; + } else document.body.style.overflow = 'auto'; + return () => { + document.body.style.overflow = 'auto'; + }; }, [tierLevel]); return (
{ }} >
{ e.preventDefault(); e.stopPropagation(); diff --git a/src/components/Tier.scss b/src/components/Tier.scss index 47c405a..a0b7261 100644 --- a/src/components/Tier.scss +++ b/src/components/Tier.scss @@ -1,5 +1,7 @@ .tier_name:hover { - button { - opacity: 1; + @media(min-width: 768px) { + button { + opacity: 1; + } } } \ No newline at end of file diff --git a/src/components/Tier.tsx b/src/components/Tier.tsx index 13be0b0..885789b 100644 --- a/src/components/Tier.tsx +++ b/src/components/Tier.tsx @@ -49,7 +49,7 @@ export const Tier = ({ color, name, textColor, id }: TierProps) => { }} >