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:
+6
-5
@@ -33,7 +33,6 @@
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
/* Custom utility for full-screen text handling */
|
||||
body {
|
||||
overscroll-behavior: none;
|
||||
}
|
||||
@@ -41,10 +40,10 @@
|
||||
<script type="importmap">
|
||||
{
|
||||
"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-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",
|
||||
"recharts": "https://esm.sh/recharts@^3.7.0"
|
||||
}
|
||||
@@ -53,5 +52,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<!-- Vite Entry Point - Points to src/index.tsx -->
|
||||
<script type="module" src="/src/index.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
+1
-1
@@ -9,9 +9,9 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^19.2.4",
|
||||
"react-dom": "^19.2.4",
|
||||
"@google/genai": "^1.38.0",
|
||||
"react": "^19.2.4",
|
||||
"lucide-react": "^0.563.0",
|
||||
"recharts": "^3.7.0"
|
||||
},
|
||||
|
||||
@@ -2,11 +2,6 @@ import { GoogleGenAI, Type } from "@google/genai";
|
||||
import { Question } from "../types";
|
||||
|
||||
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 });
|
||||
|
||||
try {
|
||||
@@ -49,4 +44,4 @@ const generateQuestions = async (topic: string, count: number = 5): Promise<Ques
|
||||
}
|
||||
};
|
||||
|
||||
export { generateQuestions };
|
||||
export { generateQuestions };
|
||||
Reference in New Issue
Block a user