friendlyIvoryVipermain.tsx3 matches
13];
1415function App() {
16const [noClicks, setNoClicks] = useState(0);
17const [isValentine, setIsValentine] = useState(false);
99}
100101function client() {
102createRoot(document.getElementById("root")).render(<App />);
103}
104if (typeof document !== "undefined") { client(); }
105106export default async function server(request: Request): Promise<Response> {
107return new Response(
108`
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`
loanCalculatorPKRmain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function LoanCalculator() {
6const [loanAmount, setLoanAmount] = useState('');
7const [interestRate, setInterestRate] = useState('');
173}
174175function client() {
176createRoot(document.getElementById("root")).render(<LoanCalculator />);
177}
178if (typeof document !== "undefined") { client(); }
179180export default async function server(request: Request): Promise<Response> {
181return new Response(`
182<html>
deadPixelTestmain.tsx4 matches
11];
1213function toggleColor(currentColor: number[]): number[] {
14const currentIndex = RGB_COLORS.findIndex(
15color => color.every((val, idx) => val === currentColor[idx])
19}
2021function App() {
22const [color, setColor] = useState(RGB_COLORS[0]);
23const [isFullscreen, setIsFullscreen] = useState(false);
81}
8283function client() {
84createRoot(document.getElementById("root")).render(<App />);
85}
87if (typeof document !== "undefined") { client(); }
8889export default function server(request: Request): Response {
90return new Response(
91`
linkifyDiscordBotmain.tsx7 matches
5import { registerDiscordSlashCommand } from "https://esm.town/v/neverstew/registerDiscordSlashCommand";
67function transformLink(url: string): string {
8try {
9const parsedUrl = new URL(url);
19}
2021function DiscordSetupInstructions() {
22return (
23<div className="setup-instructions">
66}
6768function InstallationLinks() {
69const [applicationId, setApplicationId] = useState(null);
7095}
9697function App() {
98const [url, setUrl] = useState("");
99const [transformedUrl, setTransformedUrl] = useState("");
153}
154155function client() {
156createRoot(document.getElementById("root")).render(<App />);
157}
161}
162163export default async function server(req: Request): Promise<Response> {
164if (req.method === "GET") {
165const url = new URL(req.url);
270271if (summarize) {
272response.data.content += "\n\nSummary functionality is not implemented in this example.";
273}
274
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3}
adroitBronzeBobolinkmain.tsx4 matches
5import { renderToString } from "npm:react-dom/server";
67function TodoList({ todos }: { todos: typeof todos }) {
8return (
9<div id="root">
30dangerouslySetInnerHTML={{
31__html: `
32function TodoApp() {
33const [input, setInput] = React.useState('');
34const todos = window.todos;
75}
7677function Html({ children }: { children: React.ReactNode }) {
78return (
79<html>
87}
8889export default async function (req: Request): Promise<Response> {
90const url = new URL(req.url);
91
uprightGreenLeoponmain.tsx8 matches
13}
1415function Tooltip({ children, content }: TooltipProps) {
16const [isVisible, setIsVisible] = useState(false);
17const tooltipRef = useRef<HTMLDivElement>(null);
52}
5354function formatBytes(bytes: number, decimals = 2) {
55if (bytes === 0) return "0 Bytes";
56const k = 1024;
61}
6263function copyToClipboard(text: string) {
64navigator.clipboard.writeText(text).then(() => {
65console.log("Text copied to clipboard");
69}
7071function ActionMenu({ blob, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
72const [isOpen, setIsOpen] = useState(false);
73const menuRef = useRef(null);
7677useEffect(() => {
78function handleClickOutside(event) {
79if (menuRef.current && !menuRef.current.contains(event.target)) {
80event.stopPropagation();
158}
159160function BlobItem({ blob, onSelect, isSelected, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
161const [isLoading, setIsLoading] = useState(false);
162const decodedKey = decodeURIComponent(blob.key);
219}
220221function App({ initialEmail, initialProfile }) {
222const encodeKey = (key: string) => encodeURIComponent(key);
223const decodeKey = (key: string) => decodeURIComponent(key);
645}
646647function client() {
648const initialEmail = document.getElementById("root").getAttribute("data-email");
649const initialProfile = JSON.parse(document.getElementById("root").getAttribute("data-profile"));
independentApricotDingomain.tsx3 matches
13];
1415function App() {
16const [noClicks, setNoClicks] = useState(0);
17const [isValentine, setIsValentine] = useState(false);
100}
101102function client() {
103createRoot(document.getElementById("root")).render(<App />);
104}
105if (typeof document !== "undefined") { client(); }
106107export default async function server(request: Request): Promise<Response> {
108return new Response(
109`
13];
1415function App() {
16const [noClicks, setNoClicks] = useState(0);
17const [isValentine, setIsValentine] = useState(false);
100}
101102function client() {
103createRoot(document.getElementById("root")).render(<App />);
104}
105if (typeof document !== "undefined") { client(); }
106107export default async function server(request: Request): Promise<Response> {
108return new Response(
109`