From d930d92e727f38916aa7d274e42911e195f060d3 Mon Sep 17 00:00:00 2001
From: "gpt-engineer-app[bot]"
<159125892+gpt-engineer-app[bot]@users.noreply.github.com>
Date: Thu, 16 Oct 2025 19:06:42 +0000
Subject: [PATCH] feat: Add theme switching
---
src/App.tsx | 25 +++++++------
src/components/Layout.tsx | 14 +++++--
src/components/ThemeToggle.tsx | 38 +++++++++++++++++++
src/index.css | 67 +++++++++++++++++++++++++++++-----
4 files changed, 119 insertions(+), 25 deletions(-)
create mode 100644 src/components/ThemeToggle.tsx
diff --git a/src/App.tsx b/src/App.tsx
index 18daf2e..2c69e39 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -3,6 +3,7 @@ import { Toaster as Sonner } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { BrowserRouter, Routes, Route } from "react-router-dom";
+import { ThemeProvider } from "next-themes";
import Index from "./pages/Index";
import NotFound from "./pages/NotFound";
@@ -10,17 +11,19 @@ const queryClient = new QueryClient();
const App = () => (
-
-
-
-
-
- } />
- {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
- } />
-
-
-
+
+
+
+
+
+
+ } />
+ {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
+ } />
+
+
+
+
);
diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx
index 45b309b..477a300 100644
--- a/src/components/Layout.tsx
+++ b/src/components/Layout.tsx
@@ -2,6 +2,7 @@ import { useState } from "react";
import { MessageSquare, Image, Mic, Settings, Plus, ChevronLeft, ChevronRight } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";
+import { ThemeToggle } from "@/components/ThemeToggle";
interface LayoutProps {
children: React.ReactNode;
@@ -73,8 +74,12 @@ export const Layout = ({ children, activeTab, onTabChange }: LayoutProps) => {
- {/* Settings */}
-
+ {/* Settings & Theme */}
+
+
+ Tema
+
+