Use proper is mobile hook instead of calculate ourselves

This commit is contained in:
2026-01-03 00:22:51 +01:00
parent d1217c7ed7
commit f48c3a68f9
+2 -1
View File
@@ -2,10 +2,11 @@ import { Outlet, useLocation } from 'react-router-dom';
import { motion } from 'framer-motion';
import Sidebar from './Sidebar';
import { MiniOscilloscope } from './MiniOscilloscope';
import { useIsMobile } from '@/hooks/use-mobile';
const MainLayout = () => {
const location = useLocation();
const isMobile = typeof window !== 'undefined' && window.innerWidth < 768;
const isMobile = useIsMobile();
// Don't show mini oscilloscope on the oscilloscope page itself
const showMiniOscilloscope = location.pathname !== '/oscilloscope';
// Check if on game page and mobile