1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import { formatCurrency, calculateMonthlySavingsNeeded } from "../../shared/utils.ts";
4
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import { GOAL_CATEGORIES, formatCurrency, formatDate, calculateDaysToGoal, calculateMonthlySavingsNeeded } from "../../shared/utils.ts";
4
46 }, [refreshTrigger]);
47
48 const handleSubmit = async (e: React.FormEvent) => {
49 e.preventDefault();
50
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import { EXPENSE_CATEGORIES, formatCurrency, formatDate, getCategoryEmoji } from "../../shared/utils.ts";
4
36 }, [refreshTrigger]);
37
38 const handleSubmit = async (e: React.FormEvent) => {
39 e.preventDefault();
40
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import { formatCurrency, formatDate, getCategoryEmoji } from "../../shared/utils.ts";
4
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import Dashboard from "./Dashboard.tsx";
4import ExpenseForm from "./ExpenseForm.tsx";
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0,react-dom@18.2.0";
4import App from "./components/App.tsx";
5
6// Initialize the React app
7const root = createRoot(document.getElementById("root")!);
8root.render(<App />);
76 </div>
77
78 <!-- React and app scripts -->
79 <script type="module" src="/frontend/index.tsx"></script>
80</body>
1# Login Page
2
3A complete authentication system with login and registration functionality built with React and Hono.
4
5## Features
25โโโ frontend/
26โ โโโ index.html # Main HTML template
27โ โโโ index.tsx # React app entry point
28โ โโโ components/
29โ โโโ App.tsx # Main app component
71## Technology Stack
72
73- **Frontend:** React 18, TailwindCSS
74- **Backend:** Hono, SQLite
75- **Platform:** Val Town
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3
4interface User {
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState } from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3
4interface LoginFormProps {
15 const [success, setSuccess] = useState("");
16
17 const handleSubmit = async (e: React.FormEvent) => {
18 e.preventDefault();
19 setError("");