diff --git a/src/App.js b/src/App.js
index b52ada3..38c4aca 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,5 +1,6 @@
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
import { AuthProvider } from './context/AuthContext';
+import { ThemeProvider } from './context/ThemeContext';
import RegisterPage from './components/Authentication';
import MainFeed from './components/MainFeed';
import ChatPage from './components/ChatPage';
@@ -9,6 +10,7 @@ import './styles/chat.css';
function App() {
return (
+
@@ -21,8 +23,9 @@ function App() {
} />
-
- );
-}
-
-export default App;
+
+
+ );
+ }
+
+ export default App;
diff --git a/src/components/Sidebar.jsx b/src/components/Sidebar.jsx
index 0b1135d..888a5ea 100644
--- a/src/components/Sidebar.jsx
+++ b/src/components/Sidebar.jsx
@@ -2,6 +2,7 @@ import LogoIcon from "./icons/LogoIcon";
import {NAV_BOTTOM, NAV_ITEMS} from "../config/feedConstants";
import {NavIcons} from "./icons/NavIcons";
import { useNavigate } from "react-router-dom";
+import { useTheme } from "../context/ThemeContext";
export default function Sidebar({
open,
@@ -14,6 +15,7 @@ export default function Sidebar({
onReviewsClick,
}) {
const navigate = useNavigate();
+ const { theme, toggle: toggleTheme } = useTheme();
return (
<>
@@ -78,6 +80,20 @@ export default function Sidebar({
);
})}
+
+
+ {theme === "dark" ? (
+
+ ) : (
+
+ )}
+ {theme === "dark" ? "Светлая тема" : "Тёмная тема"}
+
>
diff --git a/src/components/icons/MenuIcon.jsx b/src/components/icons/MenuIcon.jsx
index eb14c96..ef4c123 100644
--- a/src/components/icons/MenuIcon.jsx
+++ b/src/components/icons/MenuIcon.jsx
@@ -1,6 +1,6 @@
export default function MenuIcon () {
return (
-