curiousMoccasinWeaselmain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {
6const [step, setStep] = useState(0);
7const [isPlaying, setIsPlaying] = useState(false);
120}
121122function client() {
123createRoot(document.getElementById("root")).render(<App />);
124}
128}
129130export default async function server(request: Request): Promise<Response> {
131return new Response(`
132<html>
diacomDemomain.tsx4 matches
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {
6const [imageId, setImageId] = useState(null);
7const [file, setFile] = useState(null);
12let cornerstone, cornerstoneWADOImageLoader, dicomParser;
1314async function loadLibraries() {
15cornerstone = (await import("https://esm.sh/cornerstone-core")).default;
16cornerstoneWADOImageLoader = (await import("https://esm.sh/cornerstone-wado-image-loader")).default;
80}
8182function client() {
83createRoot(document.getElementById("root")).render(<App />);
84}
86if (typeof document !== "undefined") { client(); }
8788export default async function server(request: Request): Promise<Response> {
89return new Response(`
90<html>
cheerfulTanDeermain.tsx1 match
78// Fetches a random joke.
9async function fetchRandomJoke() {
10const response = await fetch(
11"https://official-joke-api.appspot.com/random_joke",
bricklesGamemain.tsx10 matches
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {
6const canvasRef = useRef(null);
7const [score, setScore] = useState(0);
36document.addEventListener('keyup', (e) => keys[e.key] = false);
3738function drawBall() {
39ctx.beginPath();
40ctx.arc(ball.x, ball.y, ball.radius, 0, Math.PI * 2);
44}
4546function drawPaddle() {
47ctx.beginPath();
48ctx.rect(paddle.x, paddle.y, paddle.width, paddle.height);
52}
5354function drawBricks() {
55for (let c = 0; c < brickColumnCount; c++) {
56for (let r = 0; r < brickRowCount; r++) {
70}
7172function drawParticles() {
73particles.forEach((particle, index) => {
74particle.life--;
87}
8889function createParticles(x, y) {
90for (let i = 0; i < 10; i++) {
91particles.push({
100}
101102function collisionDetection() {
103for (let c = 0; c < brickColumnCount; c++) {
104for (let r = 0; r < brickRowCount; r++) {
118}
119120function draw() {
121ctx.clearRect(0, 0, canvas.width, canvas.height);
122drawBricks();
187}
188189function client() {
190createRoot(document.getElementById("root")).render(<App />);
191}
192if (typeof document !== "undefined") { client(); }
193194export default async function server(request: Request): Promise<Response> {
195return new Response(`
196<html>
StripeDemomain.tsx4 matches
4import { createRoot } from "https://esm.sh/react-dom/client";
56function App() {
7const [tipAmount, setTipAmount] = useState(5);
8const paymentLinks = {
63}
6465function Success() {
66useEffect(() => {
67confetti({
81}
8283function client() {
84const root = document.getElementById("root");
85if (root) {
94if (typeof document !== "undefined") { client(); }
9596export default async function server(request: Request): Promise<Response> {
97const url = new URL(request.url);
98
handleDiscordNewUsermain.tsx1 match
3// # New Val Town User (on Clerk) -> Val Town Discord notification
4// Translates one kind of webhook (Clerk) into another (Discord)
5export async function handleDiscordNewUser(req: Request): Promise<Response> {
6// check custom auth secret sent from clerk
7if (req.headers.get("auth") !== Deno.env.get("clerkNonSensitive"))
23// Fetches a random joke.
4async function fetchRandomJoke() {
5const response = await fetch(
6"https://official-joke-api.appspot.com/random_joke",
jokeGeneratorValmain.tsx1 match
23// Fetches a random joke.
4async function fetchRandomJoke() {
5const response = await fetch(
6"https://official-joke-api.appspot.com/random_joke",
harmoniousBlackStoatmain.tsx1 match
23// Fetches a random joke.
4function fetchRandomJoke() {
5const response = fetch(
6"https://official-joke-api.appspot.com/random_joke",
labLoginUpdateStatusmain.tsx1 match
3import { sqlite } from "https://esm.town/v/std/sqlite";
45export default async function(req: Request): Promise<Response> {
6const TABLE_NAME = "lab_login_users_with_times";
7const body = await req.json();