synced_reducermain.tsx1 match
1export default async function(req: Request): Promise<Response> {
2const url = new URL(req.url);
3if (url.pathname === "/v1") {
linkInBioTemplatemain.tsx1 match
2import { renderToString } from "npm:react-dom/server";
34export default async function(req: Request) {
5return new Response(
6renderToString(
little-placemain.tsx3 matches
67const localCanvasHeight = canvas.height;
6869function drawCanvas(filledSquares) {
70ctx.clearRect(0, 0, localCanvasWidth, localCanvasHeight);
71ctx.fillStyle = "black";
79}
8081async function fetchAndUpdateCanvas() {
82try {
83const response = await fetch("/api/canvas-state");
178};
179180export default async function(req: Request) {
181const url = new URL(req.url);
182
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`
view-9448view-1227.tsx1 match
1import { email } from "https://esm.town/v/std/email";
23export default async function(req: Request): Promise<Response> {
4const xForwardedFor = req.headers.get("X-Forwarded-For") ?? "n/a";
5const trueClientIP = req.headers.get("True-Client-IP") ?? "n/a";
1export default async function (req: Request) {
2const html = `<!DOCTYPE html>
3<html lang="en">
130
131// Update the countdown every 1 second
132const countdownTimer = setInterval(function() {
133// Get current date and time
134const now = new Date().getTime();
1import { readFile } from "https://esm.town/v/std/utils@85-main/index.ts";
23export default async function(req: Request): Promise<Response> {
4const url = new URL(req.url);
5const path = url.pathname;
19
20// Create a new orange element
21function createOrange() {
22const orange = document.createElement('div');
23orange.className = 'orange w-12 h-12 bg-orange-500 rounded-full flex items-center justify-center';
41
42// Add an orange to the basket
43function addOrange() {
44const orange = createOrange();
45orangeBasket.appendChild(orange);
54
55// Start dragging an orange
56function startDrag(e) {
57isDragging = true;
58currentOrange = this;
72
73// Handle touch events for mobile
74function handleTouchStart(e) {
75isDragging = true;
76currentOrange = this;
91
92// Drag the orange
93function drag(e) {
94if (!isDragging) return;
95
103
104// Handle touch move for mobile
105function handleTouchMove(e) {
106if (!isDragging) return;
107
118
119// Drop the orange
120function drop(e) {
121if (!isDragging) return;
122
142
143// Handle touch end for mobile
144function handleTouchEnd(e) {
145if (!isDragging) return;
146
166
167// Squeeze the orange
168function squeezeOrange() {
169// Animate the bear squeezing
170bear.classList.add('squeezing');
234
235// Check for achievements based on juice amount
236function checkAchievements() {
237const achievements = [
238{ threshold: 100, message: "🎉 First Cup Filled!" },
250
251// Show achievement notification
252function showAchievement(message) {
253const notification = document.createElement('div');
254notification.className = 'fixed top-4 left-1/2 transform -translate-x-1/2 bg-orange-600 text-white px-4 py-2 rounded-lg shadow-lg z-50';
267
268// Reset the game
269function resetGame() {
270// Clear all oranges
271orangeBasket.innerHTML = '';
town-hallAttendeeForm.tsx2 matches
27}
2829export function AttendeeForm({ onSubmitSuccess, onSubmitError }: AttendeeFormProps) {
30const [formData, setFormData] = useState<FormData>({
31name: "",
108};
109110// Helper function to check if an interest is selected
111const isInterestSelected = (interestLabel: string) => {
112return formData.interests.includes(interestLabel);