mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 05:49:45 +00:00
Merge branch 'styles/navbar'
This commit is contained in:
commit
16c96a1373
1 file changed
+7
-7
@@ -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"}`}
|
||||||
|
|||||||
Reference in new issue
Block a user