From be5d866cb9b03816754acd57589deecda04628ba Mon Sep 17 00:00:00 2001
From: Ariel Costas Guerrero <94913521+arielcostas@users.noreply.github.com>
Date: Mon, 3 Mar 2025 23:41:33 +0100
Subject: Improve manifest with screenshots and shit

---
 src/pages/About.tsx | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

(limited to 'src/pages/About.tsx')

diff --git a/src/pages/About.tsx b/src/pages/About.tsx
index d286fb1..f7faec7 100644
--- a/src/pages/About.tsx
+++ b/src/pages/About.tsx
@@ -1,24 +1,9 @@
 import { Moon, Sun } from "lucide-react";
 import { useEffect, useState } from "react";
+import { useTheme } from "../ThemeContext";
 
 export function About() {
-    const [theme, setTheme] = useState<'light' | 'dark'>(() => {
-        const savedTheme = localStorage.getItem('theme');
-        if (savedTheme) {
-            return savedTheme as 'light' | 'dark';
-        }
-        const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
-        return prefersDark ? 'dark' : 'light';
-    });
-
-    useEffect(() => {
-        document.documentElement.setAttribute('data-theme', theme);
-        localStorage.setItem('theme', theme);
-    }, [theme]);
-
-    const toggleTheme = () => {
-        setTheme((prevTheme) => (prevTheme === 'light' ? 'dark' : 'light'));
-    };
+    const {theme, toggleTheme} = useTheme();
 
     return (
         <div className="about-page">
-- 
cgit v1.3

