diff --git a/src/App.css b/src/App.css
index c7da39d..081b0cf 100644
--- a/src/App.css
+++ b/src/App.css
@@ -62,6 +62,7 @@
@media (max-width: 768px) {
.site-main {
padding: 16px;
+ padding-bottom: calc(var(--bottom-nav-h, 64px) + var(--safe-area-bottom, 0px) + 16px);
}
}
diff --git a/src/App.jsx b/src/App.jsx
index 3e20dc8..6193e84 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -1,11 +1,15 @@
import React from 'react';
import { Outlet } from 'react-router-dom';
import Navbar from './components/Navbar';
+import BottomNav from './components/BottomNav';
import PageHeader from './components/PageHeader';
import Loading from './components/Loading';
+import { useIsMobile } from './hooks/useIsMobile';
import './App.css';
function App() {
+ const isMobile = useIsMobile();
+
return (
@@ -17,6 +21,7 @@ function App() {
+ {isMobile && }
);
}
diff --git a/src/components/Navbar.css b/src/components/Navbar.css
index 3999ed2..9f01c6e 100644
--- a/src/components/Navbar.css
+++ b/src/components/Navbar.css
@@ -334,26 +334,6 @@
@media (max-width: 768px) {
.sidebar {
- transform: translateX(-100%);
- }
-
- .sidebar.is-open {
- transform: translateX(0);
- }
-
- .sidebar-toggle {
- display: flex;
- }
-}
-
-/* ── 데스크톱: 토글 버튼 숨김 ────────────────────────────────────────── */
-
-@media (min-width: 769px) {
- .sidebar-toggle {
- display: none;
- }
-
- .sidebar__overlay {
display: none;
}
}
diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx
index 7926365..0a57fd6 100644
--- a/src/components/Navbar.jsx
+++ b/src/components/Navbar.jsx
@@ -1,92 +1,58 @@
-import React, { useEffect, useState } from 'react';
+import React from 'react';
import { NavLink } from 'react-router-dom';
import { navLinks } from '../routes.jsx';
+import { useIsMobile } from '../hooks/useIsMobile';
import mainLogo from '../assets/main_logo.png';
import './Navbar.css';
const Navbar = () => {
- const [menuOpen, setMenuOpen] = useState(false);
- const closeMenu = () => setMenuOpen(false);
+ const isMobile = useIsMobile();
- useEffect(() => {
- document.body.style.overflow = menuOpen ? 'hidden' : '';
- return () => {
- document.body.style.overflow = '';
- };
- }, [menuOpen]);
+ // 모바일에서는 BottomNav가 대체하므로 사이드바 미렌더링
+ if (isMobile) return null;
return (
- <>
- {/* 모바일 오버레이 */}
-
-
- {/* 모바일 토글 버튼 */}
-
-
- {/* 사이드바 본체 */}
-