Merge branch 'styles/navbar'

This commit is contained in:
ifraimka1 committed 2025-04-18 17:40:38 +03:00
commit 16c96a1373
1 file changed
+8 -8
+8 -8
View File
@@ -14,7 +14,7 @@ interface RootContextType {
} }
// Создаем контекст с типом // Создаем контекст с типом
export const RootContext = createContext<RootContextType>({ setRef: () => {} }); export const RootContext = createContext<RootContextType>({ setRef: () => { } });
function Root() { function Root() {
const location = useLocation(); // Хук для получения текущего пути const location = useLocation(); // Хук для получения текущего пути
@@ -74,12 +74,12 @@ function Root() {
return ( return (
<RootContext.Provider value={{ setRef }}> <RootContext.Provider value={{ setRef }}>
<div id="layout-wrapper"> <div id="layout-wrapper">
<Navbar /> <Navbar />
<main id="react-page" style={{ marginTop: isHomePage ? "0px" : "" }}> <main id="react-page" style={{ marginTop: isHomePage ? "0px" : "" }}>
<Outlet /> <Outlet />
</main> </main>
<Footer /> <Footer />
</div> </div>
{hasScrolled && ( {hasScrolled && (
<button <button
className={`scroll-to-top ${isOnTopVisible ? "visible" : "hidden"}`} className={`scroll-to-top ${isOnTopVisible ? "visible" : "hidden"}`}
@@ -89,7 +89,7 @@ function Root() {
</button> </button>
)} )}
</RootContext.Provider> </RootContext.Provider>
); );
} }
export default Root; export default Root;