grandIndigoGophermain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useState } from "https://esm.sh/react@18.2.0";
45const NO_PHRASES = [
carSellingWebsitemain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function App() {
cooperativeOrangeBeavermain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
45const THEMES = {
dynamicTomatoAnglerfishmain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
45const THEMES = {
solidMaroonStorkmain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React from "https://esm.sh/react@18.2.0";
45function LinkInBio() {
linkInBioTemplatemain.tsx2 matches
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
34export default async function(req: Request) {
cerebras_coderindex10 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0";
3import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter?deps=react@18.2.0,react-dom@18.2.0";
4import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
5import STARTER_PROMPTS from "./starter-prompts.js";
630}: {
31prompt: string;
32setPrompt: React.Dispatch<React.SetStateAction<string>>;
33handleSubmit: (e: React.FormEvent) => void;
34handleStarterPromptClick: (promptItem: PromptItem) => void;
35}) {
116117function App() {
118const previewRef = React.useRef<HTMLDivElement>(null);
119const [prompt, setPrompt] = useState("");
120const [projectId, setProjectId] = useState<number | null>(null);
174}
175176async function handleSubmit(e: React.FormEvent | string) {
177if (typeof e !== "string") {
178e.preventDefault();
673</div>
674<div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
675<React.Fragment key={iframeKey}>
676<iframe
677srcDoc={code}
679className="w-full grow"
680/>
681</React.Fragment>
682</div>
683</div>
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useState } from "https://esm.sh/react@18.2.0";
45const NO_PHRASES = [
gentleMaroonCuckoomain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect, useRef } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function App() {
accurateRedMosquitomain.tsx24 matches
1/** @jsxImportSource https://esm.sh/react */
2// Set to true to disable all editing functionality
3const READ_ONLY = false;
45import { nanoid } from "https://esm.sh/nanoid";
6import React from "https://esm.sh/react";
7import { createRoot } from "https://esm.sh/react-dom/client";
89interface Song {
1718function AddSongForm({ onAdd }: { onAdd: (song: Omit<Song, "id" | "created_at">) => void }) {
19const [url, setUrl] = React.useState("");
20const [title, setTitle] = React.useState("");
21const [tag, setTag] = React.useState("");
22const [isLoading, setIsLoading] = React.useState(false);
23const [error, setError] = React.useState("");
2425const handleSubmit = async (e: React.FormEvent) => {
26e.preventDefault();
27setIsLoading(true);
97},
98) {
99const [isEditing, setIsEditing] = React.useState(false);
100const [editUrl, setEditUrl] = React.useState(song.url);
101const [editTitle, setEditTitle] = React.useState(song.title);
102const [editTag, setEditTag] = React.useState(song.tag || "");
103const [isDeleting, setIsDeleting] = React.useState(false);
104const [isLoading, setIsLoading] = React.useState(false);
105106const handleDelete = () => {
113};
114115const handleSubmit = async (e: React.FormEvent) => {
116e.preventDefault();
117setIsLoading(true);
190191function App() {
192const [songs, setSongs] = React.useState<Song[]>([]);
193const [sortBy, setSortBy] = React.useState<"date" | "title">("date");
194const [selectedTag, setSelectedTag] = React.useState<string>("");
195const [isLoading, setIsLoading] = React.useState(true);
196const [error, setError] = React.useState("");
197198const fetchSongs = async () => {
209};
210211React.useEffect(() => {
212fetchSongs();
213}, []);
253};
254255const tags = React.useMemo(() => {
256const tagSet = new Set(songs.map((s) => s.tag).filter(Boolean));
257return Array.from(tagSet);
258}, [songs]);
259260const filteredAndSortedSongs = React.useMemo(() => {
261let filtered = selectedTag ? songs.filter((s) => s.tag === selectedTag) : songs;
262return [...filtered].sort((a, b) => {