hardworkingLimeCheetahmain.tsx10 matches
12type PromptItem = typeof prompts[number];
1314function Hero({
15prompt,
16setPrompt,
5051<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
52Turn your ideas into fully functional apps in{" "}
53<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
54less than a second
121}
122123function App() {
124const previewRef = React.useRef<HTMLDivElement>(null);
125const [prompt, setPrompt] = useState("");
174});
175176function handleStarterPromptClick(promptItem: typeof prompts[number]) {
177setLoading(true);
178setTimeout(() => handleSubmit(promptItem.prompt), 0);
179}
180181async function handleSubmit(e: React.FormEvent | string) {
182if (typeof e !== "string") {
183e.preventDefault();
230}
231232function handleVersionChange(direction: "back" | "forward") {
233const { currentVersionIndex, versions } = versionHistory;
234if (direction === "back" && currentVersionIndex > 0) {
993);
994995function client() {
996const path = window.location.pathname;
997const root = createRoot(document.getElementById("root")!);
1029}
10301031function extractCodeFromFence(text: string): string {
1032const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
1033return htmlMatch ? htmlMatch[1].trim() : text;
1034}
10351036async function generateCode(prompt: string, currentCode: string) {
1037const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
1038if (starterPrompt) {
1075}
10761077export default async function server(req: Request): Promise<Response> {
1078// Dynamic import for SQLite to avoid client-side import
1079const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
strategiesHelpersmain.tsx2 matches
777}
778779function predictDraw(teamA, teamB, tournament) {
780if (!teamA || !teamB) return 0;
781782// Helper function to calculate draw rate
783const calculateDrawRate = (team) =>
784team.results.draws / team.totalMatches;
blob_adminmain.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"));
notUberHomemain.tsx1 match
117};
118119export function Home() {
120return (
121<div className="p-0 md:p-4">
notUberAccountmain.tsx1 match
5import { INSTANTDB_APP_ID } from "https://esm.town/v/vawogbemi/notUberConsts";
67export function Account() {
8const db = init({ appId: INSTANTDB_APP_ID });
9
notUberRidemain.tsx1 match
82};
8384export function Ride() {
85return (
86<div className="">
notUberNewmain.tsx2 matches
205};
206207export function New() {
208return (
209<div className="p-0 md:py-4">
241`;
242243export default async function server(request: Request): Promise<Response> {
244return new Response(
245`
notUberRidesmain.tsx1 match
6import { INSTANTDB_APP_ID } from "https://esm.town/v/vawogbemi/notUberConsts";
78export function Rides() {
9const db = init({ appId: INSTANTDB_APP_ID });
10
gregariousCrimsonFlamingomain.tsx9 matches
13const FONT_FAMILY = 'CIRO, Arial, sans-serif';
1415function MainHeader() {
16const [dropdownOpen, setDropdownOpen] = useState(false);
17
77}
7879function MorePage() {
80const navigate = useNavigate();
81208}
209210function App() {
211return (
212<BrowserRouter>
231}
232233function BottomNavbar() {
234const navigate = useNavigate();
235
272}
273274function MainPage() {
275const navigate = useNavigate();
276
337}
338339function ServicesPage() {
340const navigate = useNavigate();
341const [searchTerm, setSearchTerm] = useState('');
460}
461462function ReportsPage() {
463const navigate = useNavigate();
464const [selectedReport, setSelectedReport] = useState(null);
581}
582583function client() {
584createRoot(document.getElementById("root")).render(<App />);
585}
587if (typeof document !== "undefined") { client(); }
588589export default async function server(request: Request): Promise<Response> {
590return new Response(`
591<html>