8}
910export function App() {
11const [messages, setMessages] = useState<Message[]>([]);
12const [isLoading, setIsLoading] = useState(false);
linkInBioTemplatemain.tsx3 matches
25];
2627function App() {
28const [activeTab, setActiveTab] = useState("games");
29const [selectedWallpaper, setSelectedWallpaper] = useState("/wallpapers/4.svg");
139}
140141function client() {
142createRoot(document.getElementById("root")).render(<App />);
143}
145if (typeof document !== "undefined") { client(); }
146147export default async function server(request: Request): Promise<Response> {
148return new Response(`
149<html>
poorvis885main.tsx6 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function WeatherDashboard() {
6const [location, setLocation] = useState({ latitude: 40.7128, longitude: -74.0060, name: 'New York City' });
7const [weatherData, setWeatherData] = useState(null);
1112// Generate random light color scheme for dynamic visual appeal
13function getRandomColorScheme() {
14const colorSchemes = [
15{
4243useEffect(() => {
44async function fetchWeatherAndAI() {
45try {
46setLoading(true);
181}
182183function LocationSearch({ onLocationChange, accentColor, textColor }) {
184const [input, setInput] = useState('');
185const [error, setError] = useState('');
234}
235236function client() {
237createRoot(document.getElementById("root")).render(<WeatherDashboard />);
238}
239if (typeof document !== "undefined") { client(); }
240241export default async function server(request: Request): Promise<Response> {
242return new Response(`
243<html>
weatherDashboardmain.tsx6 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function WeatherDashboard() {
6const [location, setLocation] = useState({ latitude: 40.7128, longitude: -74.0060, name: 'New York City' });
7const [weatherData, setWeatherData] = useState(null);
1112// Generate random light color scheme for dynamic visual appeal
13function getRandomColorScheme() {
14const colorSchemes = [
15{
4243useEffect(() => {
44async function fetchWeatherAndAI() {
45try {
46setLoading(true);
181}
182183function LocationSearch({ onLocationChange, accentColor, textColor }) {
184const [input, setInput] = useState('');
185const [error, setError] = useState('');
234}
235236function client() {
237createRoot(document.getElementById("root")).render(<WeatherDashboard />);
238}
239if (typeof document !== "undefined") { client(); }
240241export default async function server(request: Request): Promise<Response> {
242return new Response(`
243<html>
22];
2324export default async function(e: Email) {
25console.log(JSON.stringify(e, null, 2));
26
13];
1415function App() {
16const [noClicks, setNoClicks] = useState(0);
17const [isValentine, setIsValentine] = useState(false);
98}
99100function client() {
101createRoot(document.getElementById("root")).render(<App />);
102}
103if (typeof document !== "undefined") { client(); }
104105export default async function server(request: Request): Promise<Response> {
106return new Response(
107`
weatherDashboardmain.tsx4 matches
3import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
45function WeatherDashboard() {
6const [location, setLocation] = useState({ lat: 40.7128, lon: -74.0060 }); // Default to New York
7const [weather, setWeather] = useState(null);
910useEffect(() => {
11async function fetchWeather() {
12try {
13const response = await fetch(
75}
7677function client() {
78createRoot(document.getElementById("root")).render(<WeatherDashboard />);
79}
80if (typeof document !== "undefined") { client(); }
8182export default async function server(request: Request): Promise<Response> {
83return new Response(
84`
kanbanTestmain.tsx16 matches
37};
3839// Utility functions
40const utils = {
41loadFromStorage: (key, defaultValue) => {
5354// Main TaskBoard component
55function TaskBoard() {
56const [taskLists, setTaskLists] = useState({
57[config.columns.todo]: [],
76}, []);
7778function loadUserPreferences() {
79const savedDarkMode = utils.loadFromStorage(config.storage.theme, false);
80setIsDarkMode(savedDarkMode);
91}
9293function saveUserPreferences() {
94utils.saveToStorage(config.storage.font, chosenFont);
95utils.saveToStorage(config.storage.fontSize, fontSize);
99}
100101async function fetchTasks() {
102try {
103const response = await fetch("/get-tasks");
109}
110111async function addNewTask() {
112if (!newTaskText.trim()) return;
113129}
130131async function handleTaskMove(result) {
132const { destination, source, draggableId } = result;
133if (!destination) return;
150}
151152async function removeTask(taskId, column) {
153try {
154const response = await fetch("/delete-task", {
164}
165166async function moveTaskForward(task, currentColumn) {
167const currentIndex = listProgression.indexOf(currentColumn);
168const nextColumn = listProgression[currentIndex + 1];
185}
186187function toggleDarkMode() {
188const newDarkMode = !isDarkMode;
189setIsDarkMode(newDarkMode);
192}
193194function openEditModal(task) {
195setTaskBeingEdited(task);
196setEditedTaskText(task.title);
198}
199200async function saveEditedTask() {
201if (!editedTaskText.trim() || !taskBeingEdited) return;
202try {
218}
219220function handleTaskInteraction(e, task, column) {
221if (e.button === 1) {
222e.preventDefault();
455}
456457export default async function server(request: Request): Promise<Response> {
458const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
459const tableName = config.database.getTableName();
531const TaskBoard = ${TaskBoard.toString()};
532
533function client() {
534const root = document.getElementById("root");
535if (root) {
549}
550551async function getAllTasks(sqlite, tableName) {
552const columns = Object.values(config.columns);
553const tasks = await Promise.all(
33}
3435// Utility functions
36const storage = {
37get: (key: string) => JSON.parse(localStorage.getItem(key) || "null"),
7172// Components
73function AddTodoForm({ onAdd }: { onAdd: (text: string) => void }) {
74const [text, setText] = useState("");
7596}
9798function TodoItem(
99{ todo, onEdit, onDelete, visibleFields }: {
100todo: Todo;
133}
134135function EditOverlay({ todo, onSave, onCancel }: { todo: Todo; onSave: (todo: Todo) => void; onCancel: () => void }) {
136const [editedTodo, setEditedTodo] = useState(todo);
137181}
182183function SettingsOverlay(
184{ visibleFields, onToggle, onClose }: {
185visibleFields: VisibleFields;
211}
212213function TodoApp(): JSX.Element {
214const [todos, setTodos] = useState<Todo[]>([]);
215const [isDarkMode, setIsDarkMode] = useState(false);
357}
358359function mountClient() {
360const rootElement = document.getElementById("root");
361if (rootElement) {
368}
369370export default async function server(request: Request): Promise<Response> {
371const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
372const dbName = config.dbName();