FixItWandconsts.tsx1 match
1/** @jsxImportSource https://esm.sh/react@19.0.0 */
23// Use environment variables or fallback to default values for development
1import { appendMessage } from "https://esm.town/v/augustohp/Kali/dify/api";
2import { userCreateFromWebhook } from "https://esm.town/v/augustohp/Kali/orm";
3import { react, sendText } from "https://esm.town/v/augustohp/Kali/zapi/api";
4import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
5import { telegramSendMessage } from "https://esm.town/v/vtdocs/telegramSendMessage";
42};
4344type Reaction = {
45type: "emoji" | "custom_emoji" | "paid";
46emoji?: string;
48};
4950type ReactionReceived = {
51chat: Chat;
52message_id: number;
53from: User;
54date: number;
55old_reaction: Reaction[];
56new_reaction: Reaction[];
57};
587879/**
80* Sets the reaction of a message.
81*/
82export async function setReaction(
83chatId: number,
84messageId: number,
85reaction: string,
86isBig: boolean = false,
87): Promise<boolean> {
88const reactionType: Reaction[] = [{ type: "emoji", emoji: reaction }];
89let url = new URL(`https://api.telegram.org/bot${telegramToken}/setMessageReaction`);
90url.searchParams.append("chat_id", chatId.toString());
91url.searchParams.append("message_id", messageId.toString());
92url.searchParams.append("reaction", JSON.stringify(reactionType));
93url.searchParams.append("is_big", isBig.toString());
94const r = await fetchJSON(url.toString());
95console.log("Setting reaction...");
96console.log(r);
97return r.ok === true;
100async function receiveMessage(r: MessageReceived): Promise<Response> {
101console.log(r);
102await setReaction(r.chat.id, r.message_id, "👀");
103let photoStream: Uint8Array | undefined = undefined;
104let text = r.text;
113});
114console.log(resZap);
115await setReaction(r.chat.id, r.message_id, "👍");
116return Response.json({ ok: true });
117}
118119async function receiveReaction(r: ReactionReceived): Promise<Response> {
120console.log(r);
121return Response.json({ ok: true });
138if (r.message) {
139return await receiveMessage(r.message);
140} else if (r.message_reaction) {
141return await receiveReaction(r.message_reaction);
142}
143
reactRouter7ExampleApp.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { Outlet, useNavigation } from "https://esm.sh/react-router@7.5.0?deps=react@18.2.0,react-dom@18.2.0";
3import React from "https://esm.sh/react@18.2.0";
4import { LoadingSpinner } from "./LoadingSpinner.tsx";
5
reactRouter7ExampleSearchForm.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { Form, useNavigation, useSearchParams } from "https://esm.sh/react-router@7.5.0?deps=react@18.2.0,react-dom@18.2.0";
4import { LoadingSpinner } from "./LoadingSpinner.tsx";
5
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
34interface LoadingSpinnerProps {
mapsclonerREADME.md4 matches
1# React Hono Starter
23This app is a starter template for client-side React and server-side Hono.
45- **Remix** this starter template on the top right to get started.
7- The **entrypoint** is `/backend/index.ts`. That's the backend HTTP server, which also serves the all the frontend assets.
89- The **client-side entrypoint** is `/frontend/index.html`, which in turn imports `/frontend/index.tsx`, which in turn imports the React app from `/frontend/components/App.tsx`.
1011[React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a fuller featured example project, with a SQLite database table, queries, client-side CSS and a favicon, and some shared code that runs on both client and server.
mapsclonerindex.tsx2 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import { App } from "./components/App.tsx";
4
mapsclonerindex.html1 match
4<meta charset="UTF-8">
5<meta name="viewport" content="width=device-width, initial-scale=1.0">
6<title>React Hono Val Town Starter</title>
7<link rel="stylesheet" href="/public/style.css">
8<link rel="icon" href="/public/favicon.svg" sizes="any" type="image/svg+xml">
mapsclonerApp.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState } from "https://esm.sh/react@18.2.0";
34export function App() {
6return (
7<div>
8<h1>Val Town React + Hono Starter</h1>
9I've been clicked <button onClick={() => setClicked((c) => c + 1)}>{clicked}</button> times
10</div>
blogSocialLinks.tsx1 match
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { BlueskyIcon, DiscordIcon, GitHubIcon, RSSIcon, TwitterIcon } from "./icons.tsx";
3