dedicatedAmethystLeopardmain.tsx7 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function App() {
6const [stocks, setStocks] = useState([]);
7const [newStock, setNewStock] = useState({
17}, []);
1819async function fetchStocks() {
20const response = await fetch('/stocks');
21const data = await response.json();
23}
2425function handleInputChange(e) {
26const { name, value } = e.target;
27setNewStock(prev => ({
31}
3233async function addStock(e) {
34e.preventDefault();
35const response = await fetch('/stocks', {
5455// Calculate profit/loss
56function calculateProfit(stock) {
57if (!stock.sellingPrice) return null;
58const totalPurchase = stock.quantity * stock.purchasePrice;
159}
160161function client() {
162createRoot(document.getElementById("root")).render(<App />);
163}
164if (typeof document !== "undefined") { client(); }
165166export default async function server(request: Request): Promise<Response> {
167const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
168const KEY = "dedicatedAmethystLeopard";
secureBlueTortoisemain.tsx1 match
1export default async function (e: Email) {
2
3}
1export default async function handler(request: Request): Promise<Response> {
2const searchParams = new URL(request.url).searchParams;
3const url = searchParams.get("url") || "https://www.browserbase.com";
cerebras_codermain.tsx9 matches
15"recipe ingredient converter and scaler",
16"morse code translator with audio output",
17"random quote generator with tweet functionality",
18"personal finance tracker with basic charts",
19"multiplayer rock-paper-scissors game",
20];
2122function Dashboard() {
23const [stats, setStats] = useState<{
24totalGenerations: number;
3637useEffect(() => {
38async function fetchStats() {
39const response = await fetch("/dashboard-stats");
40const data = await response.json();
115}
116117function App() {
118const [prompt, setPrompt] = useState(
119STARTER_PROMPTS[Math.floor(Math.random() * STARTER_PROMPTS.length)],
141});
142143async function handleSubmit(e: React.FormEvent) {
144e.preventDefault();
145setLoading(true);
174}
175176function handleVersionChange(direction: "back" | "forward") {
177const { currentVersionIndex, versions } = versionHistory;
178305}
306307function client() {
308const path = window.location.pathname;
309const root = createRoot(document.getElementById("root")!);
320}
321322function extractCodeFromFence(text: string): string {
323const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
324return htmlMatch ? htmlMatch[1].trim() : text;
325}
326327export default async function server(req: Request): Promise<Response> {
328// Dynamic import for SQLite to avoid client-side import
329const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1import { fetch } from "https://esm.town/v/std/fetch";
23function fetchJSON(url) {
4return fetch(url).then(res => res.json());
5}
productiveRosePeacockmain.tsx9 matches
15"recipe ingredient converter and scaler",
16"morse code translator with audio output",
17"random quote generator with tweet functionality",
18"personal finance tracker with basic charts",
19"multiplayer rock-paper-scissors game",
20];
2122function Dashboard() {
23const [stats, setStats] = useState<{
24totalGenerations: number;
3637useEffect(() => {
38async function fetchStats() {
39const response = await fetch("/dashboard-stats");
40const data = await response.json();
115}
116117function App() {
118const [prompt, setPrompt] = useState(
119STARTER_PROMPTS[Math.floor(Math.random() * STARTER_PROMPTS.length)],
141});
142143async function handleSubmit(e: React.FormEvent) {
144e.preventDefault();
145setLoading(true);
174}
175176function handleVersionChange(direction: "back" | "forward") {
177const { currentVersionIndex, versions } = versionHistory;
178305}
306307function client() {
308const path = window.location.pathname;
309const root = createRoot(document.getElementById("root")!);
320}
321322function extractCodeFromFence(text: string): string {
323const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
324return htmlMatch ? htmlMatch[1].trim() : text;
325}
326327export default async function server(req: Request): Promise<Response> {
328// Dynamic import for SQLite to avoid client-side import
329const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
prodigiousBrownImpalamain.tsx9 matches
15"recipe ingredient converter and scaler",
16"morse code translator with audio output",
17"random quote generator with tweet functionality",
18"personal finance tracker with basic charts",
19"multiplayer rock-paper-scissors game",
20];
2122function Dashboard() {
23const [stats, setStats] = useState<{
24totalGenerations: number;
3637useEffect(() => {
38async function fetchStats() {
39const response = await fetch("/dashboard-stats");
40const data = await response.json();
115}
116117function App() {
118const [prompt, setPrompt] = useState(
119STARTER_PROMPTS[Math.floor(Math.random() * STARTER_PROMPTS.length)],
141});
142143async function handleSubmit(e: React.FormEvent) {
144e.preventDefault();
145setLoading(true);
174}
175176function handleVersionChange(direction: "back" | "forward") {
177const { currentVersionIndex, versions } = versionHistory;
178305}
306307function client() {
308const path = window.location.pathname;
309const root = createRoot(document.getElementById("root")!);
320}
321322function extractCodeFromFence(text: string): string {
323const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
324return htmlMatch ? htmlMatch[1].trim() : text;
325}
326327export default async function server(req: Request): Promise<Response> {
328// Dynamic import for SQLite to avoid client-side import
329const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
BestTime2postmain.tsx5 matches
11].slice(0, 6); // Limit to first 6 platforms for performance
1213function useTimeout(callback, delay) {
14useEffect(() => {
15if (delay !== null) {
20}
2122function App() {
23const [step, setStep] = useState(1);
24const [formData, setFormData] = useState({
202}
203204function renderApp() {
205const root = document.getElementById("root");
206if (root) {
211}
212213function client() {
214if (document.readyState === "loading") {
215document.addEventListener("DOMContentLoaded", renderApp);
223}
224225export default async function server(request: Request): Promise<Response> {
226const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
227const { email } = await import("https://esm.town/v/std/email");
captivatingPurpleTapirmain.tsx11 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function App() {
6const [stocks, setStocks] = useState([]);
7const [operations, setOperations] = useState([]);
19}, []);
2021async function fetchStocks() {
22const response = await fetch('/stocks');
23const data = await response.json();
25}
2627async function fetchOperations() {
28const response = await fetch('/operations');
29const data = await response.json();
31}
3233async function addStock(e) {
34e.preventDefault();
35const response = await fetch('/stocks', {
43}
4445async function deleteStock(symbol: string, shares: number, purchasePrice: number) {
46const response = await fetch('/stocks', {
47method: 'DELETE',
53}
5455async function updateStock(stock) {
56const response = await fetch('/stocks', {
57method: 'PUT',
121// Rest of the client-side code remains the same
122123export default async function server(request: Request): Promise<Response> {
124const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
125const KEY = "captivatingPurpleTapir";
147`);
148149// Function to log operations
150async function logOperation(type: string, details: string) {
151await sqlite.execute(
152`INSERT INTO ${KEY}_operations_${SCHEMA_VERSION} (type, details) VALUES (?, ?)`,
269}
270271// Existing fetchStockPrice function remains the same
272async function fetchStockPrice(symbol: string): Promise<number> {
273try {
274const response = await fetch(`https://query1.finance.yahoo.com/v8/finance/chart/${symbol}`);