Procházet zdrojové kódy

chore: clean up code structure and remove unused code blocks

Insouciant21 před 4 měsíci
rodič
revize
814cc92002
6 změnil soubory, kde provedl 101 přidání a 767 odebrání
  1. 1 0
      .gitignore
  2. 16 14
      hooks/use-mobile.ts
  3. 1 1
      next-env.d.ts
  4. 0 1
      next.config.ts
  5. 2 9
      package.json
  6. 81 742
      pnpm-lock.yaml

+ 1 - 0
.gitignore

@@ -7,3 +7,4 @@ backend*
 *.log
 .env*
 !.env.example
+AGENTS.md

+ 16 - 14
hooks/use-mobile.ts

@@ -1,21 +1,23 @@
 import * as React from "react";
 
 const MOBILE_BREAKPOINT = 768;
+const MOBILE_MEDIA_QUERY = `(max-width: ${MOBILE_BREAKPOINT - 1}px)`;
 
-export function useIsMobile() {
-  const [isMobile, setIsMobile] = React.useState<boolean | undefined>(
-    undefined,
-  );
+function subscribe(callback: () => void) {
+  const mql = window.matchMedia(MOBILE_MEDIA_QUERY);
+  mql.addEventListener("change", callback);
+
+  return () => mql.removeEventListener("change", callback);
+}
 
-  React.useEffect(() => {
-    const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
-    const onChange = () => {
-      setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
-    };
-    mql.addEventListener("change", onChange);
-    setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
-    return () => mql.removeEventListener("change", onChange);
-  }, []);
+function getSnapshot() {
+  return window.innerWidth < MOBILE_BREAKPOINT;
+}
 
-  return !!isMobile;
+function getServerSnapshot() {
+  return false;
+}
+
+export function useIsMobile() {
+  return React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
 }

+ 1 - 1
next-env.d.ts

@@ -1,6 +1,6 @@
 /// <reference types="next" />
 /// <reference types="next/image-types/global" />
-import "./.next/dev/types/routes.d.ts";
+import "./.next/types/routes.d.ts";
 
 // NOTE: This file should not be edited
 // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

+ 0 - 1
next.config.ts

@@ -16,7 +16,6 @@ const nextConfig: NextConfig = {
     ],
   },
   output: "standalone",
-  transpilePackages: ["motion"],
 };
 
 export default nextConfig;

+ 2 - 9
package.json

@@ -11,14 +11,10 @@
     "clean": "next clean"
   },
   "dependencies": {
-    "@google/genai": "^1.17.0",
-    "@hookform/resolvers": "^5.2.1",
     "autoprefixer": "^10.4.21",
-    "class-variance-authority": "^0.7.1",
     "clsx": "^2.1.1",
     "lucide-react": "^0.553.0",
-    "motion": "^12.23.24",
-    "next": "^16.1.6",
+    "next": "^16.2.4",
     "next-themes": "^0.4.6",
     "postcss": "^8.5.6",
     "react": "^19.2.4",
@@ -27,15 +23,12 @@
   },
   "devDependencies": {
     "@tailwindcss/postcss": "4.1.11",
-    "@tailwindcss/typography": "^0.5.19",
     "@types/node": "^20",
     "@types/react": "^19",
     "@types/react-dom": "^19",
     "eslint": "9.39.1",
-    "eslint-config-next": "16.1.6",
-    "firebase-tools": "^15.0.0",
+    "eslint-config-next": "16.2.4",
     "tailwindcss": "4.1.11",
-    "tw-animate-css": "^1.4.0",
     "typescript": "5.9.3"
   }
 }

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 81 - 742
pnpm-lock.yaml


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů