refactor: editor responsive navigation

This commit is contained in:
Carlos Valente
2025-06-22 12:43:11 +02:00
committed by Carlos Valente
parent cff73a65a5
commit b991627cb7
10 changed files with 131 additions and 66 deletions
@@ -1,14 +1,14 @@
import { IoLockClosedOutline } from 'react-icons/io5';
import { useNavigate } from 'react-router-dom';
import { useViewportSize } from '@mantine/hooks';
import { useIsSmallDevice } from '../../../hooks/useIsSmallDevice';
import NavigationMenuItem from '../navigation-menu-item/NavigationMenuItem';
export default function EditorNavigation() {
const { width } = useViewportSize();
const navigate = useNavigate();
const isSmallDevide = useIsSmallDevice();
if (width > 1440) {
if (!isSmallDevide) {
return (
<NavigationMenuItem active={location.pathname === '/editor'} onClick={() => navigate('/editor')}>
<IoLockClosedOutline />