Ver Fonte

chore: clean up code structure and remove unused code blocks

Insouciant21 há 4 meses atrás
pai
commit
814cc92002
6 ficheiros alterados com 101 adições e 767 exclusões
  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
 *.log
 .env*
 .env*
 !.env.example
 !.env.example
+AGENTS.md

+ 16 - 14
hooks/use-mobile.ts

@@ -1,21 +1,23 @@
 import * as React from "react";
 import * as React from "react";
 
 
 const MOBILE_BREAKPOINT = 768;
 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" />
 /// <reference types="next/image-types/global" />
 /// <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
 // NOTE: This file should not be edited
 // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
 // 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",
   output: "standalone",
-  transpilePackages: ["motion"],
 };
 };
 
 
 export default nextConfig;
 export default nextConfig;

+ 2 - 9
package.json

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

Diff do ficheiro suprimidas por serem muito extensas
+ 81 - 742
pnpm-lock.yaml


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff