feat: Update dependencies and import maps
Upgrades React to v19.2.4 and adjusts ESM import maps to ensure correct versioning and loading. Also, removes redundant API key check in geminiService.ts as it's handled at build time.
This commit is contained in:
+5
-4
@@ -33,7 +33,6 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
/* Custom utility for full-screen text handling */
|
|
||||||
body {
|
body {
|
||||||
overscroll-behavior: none;
|
overscroll-behavior: none;
|
||||||
}
|
}
|
||||||
@@ -41,10 +40,10 @@
|
|||||||
<script type="importmap">
|
<script type="importmap">
|
||||||
{
|
{
|
||||||
"imports": {
|
"imports": {
|
||||||
"react-dom/": "https://esm.sh/react-dom@^19.2.4/",
|
|
||||||
"@google/genai": "https://esm.sh/@google/genai@^1.38.0",
|
|
||||||
"react/": "https://esm.sh/react@^19.2.4/",
|
|
||||||
"react": "https://esm.sh/react@^19.2.4",
|
"react": "https://esm.sh/react@^19.2.4",
|
||||||
|
"react-dom/": "https://esm.sh/react-dom@^19.2.4/",
|
||||||
|
"react/": "https://esm.sh/react@^19.2.4/",
|
||||||
|
"@google/genai": "https://esm.sh/@google/genai@^1.38.0",
|
||||||
"lucide-react": "https://esm.sh/lucide-react@^0.563.0",
|
"lucide-react": "https://esm.sh/lucide-react@^0.563.0",
|
||||||
"recharts": "https://esm.sh/recharts@^3.7.0"
|
"recharts": "https://esm.sh/recharts@^3.7.0"
|
||||||
}
|
}
|
||||||
@@ -53,5 +52,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
<!-- Vite Entry Point - Points to src/index.tsx -->
|
||||||
|
<script type="module" src="/src/index.tsx"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
+1
-1
@@ -9,9 +9,9 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"react": "^19.2.4",
|
||||||
"react-dom": "^19.2.4",
|
"react-dom": "^19.2.4",
|
||||||
"@google/genai": "^1.38.0",
|
"@google/genai": "^1.38.0",
|
||||||
"react": "^19.2.4",
|
|
||||||
"lucide-react": "^0.563.0",
|
"lucide-react": "^0.563.0",
|
||||||
"recharts": "^3.7.0"
|
"recharts": "^3.7.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,11 +2,6 @@ import { GoogleGenAI, Type } from "@google/genai";
|
|||||||
import { Question } from "../types";
|
import { Question } from "../types";
|
||||||
|
|
||||||
const generateQuestions = async (topic: string, count: number = 5): Promise<Question[]> => {
|
const generateQuestions = async (topic: string, count: number = 5): Promise<Question[]> => {
|
||||||
if (!process.env.API_KEY) {
|
|
||||||
console.error("API Key is missing");
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
const ai = new GoogleGenAI({ apiKey: process.env.API_KEY });
|
const ai = new GoogleGenAI({ apiKey: process.env.API_KEY });
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user