1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from 'https://esm.sh/react@18.2.0';
3import { createRoot } from 'https://esm.sh/react-dom@18.2.0/client';
4import App from './App.jsx';
56const root = createRoot(document.getElementById('root'));
7root.render(
8<React.StrictMode>
9<App />
10</React.StrictMode>
11);
townie-testportfolio.ts3 matches
125</div>
126<div class="bg-white p-6 rounded-lg shadow-md text-center">
127<i class="fab fa-react text-4xl text-blue-400 mb-4"></i>
128<h3 class="text-xl font-semibold">React</h3>
129</div>
130<div class="bg-white p-6 rounded-lg shadow-md text-center">
162<p class="text-gray-600 mb-4">A fully responsive e-commerce platform with product catalog, shopping cart, and payment integration.</p>
163<div class="flex flex-wrap gap-2 mb-4">
164<span class="bg-indigo-100 text-indigo-800 text-xs px-2 py-1 rounded">React</span>
165<span class="bg-indigo-100 text-indigo-800 text-xs px-2 py-1 rounded">Node.js</span>
166<span class="bg-indigo-100 text-indigo-800 text-xs px-2 py-1 rounded">MongoDB</span>
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import {
4BrowserRouter as Router,
9useNavigate,
10useParams,
11} from "https://esm.sh/react-router-dom@6.11.2?deps=react@18.2.0";
12import React, { createContext, useContext, useEffect, useState } from "https://esm.sh/react@18.2.0";
1314// --- Sync ID Management ---
cerebras_coder-BELLOYARONindex.ts10 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>
cerebras_coderindex.ts10 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 {
3ClerkProvider,
9UserButton,
10useUser,
11} from "https://esm.sh/@clerk/clerk-react?bundle-deps&deps=react@18.2.0";
12import { clerkMiddleware, getAuth } from "https://esm.sh/@hono/clerk-auth?bundle-deps&deps=react@18.2.0";
13import { id, init, lookup, tx } from "https://esm.sh/@instantdb/react@0.18.1?bundle-deps&deps=react@18.2.0";
14import {
15IconChevronDown,
25IconUser,
26IconX,
27} from "https://esm.sh/@tabler/icons-react?deps=react@18.2.0";
28import useEmblaCarousel, { EmblaCarouselType } from "https://esm.sh/embla-carousel-react@8.0.0-rc07?deps=react@18.2.0";
29import { Hono } from "https://esm.sh/hono?bundle-deps&deps=react@18.2.0";
30import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
31import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
32import {
33BrowserRouter,
37useLocation,
38useParams,
39} from "https://esm.sh/react-router-dom?deps=react@18.2.0";
40import React, { useCallback, useEffect, useMemo, useRef, useState } from "https://esm.sh/react@18.2.0";
41import { toast, Toaster } from "https://esm.sh/sonner?deps=react@18.2.0";
42import { Drawer } from "https://esm.sh/vaul?deps=react@18.2.0,react-dom@18.2.0";
4344function SideDrawer({ trigger, title, content, initialOpen = false }: {
45trigger: React.JSX.Element;
46title: string;
47content: (setOpen: React.Dispatch<React.SetStateAction<boolean>>) => React.JSX.Element;
48initialOpen?: boolean;
49}) {
50const [open, setOpen] = React.useState(initialOpen);
5152return (
7576function BottomDrawer({ trigger, title, content, initialOpen = false }: {
77trigger: React.JSX.Element;
78title: string;
79content: (setOpen: React.Dispatch<React.SetStateAction<boolean>>) => React.JSX.Element;
80initialOpen?: boolean;
81}) {
82const [open, setOpen] = React.useState(initialOpen);
8384return (
127const getQuantity = () => product?.cartItems?.[0]?.quantity || 0;
128129const handleDecreaseQuantity = async (e: React.MouseEvent) => {
130e.stopPropagation();
131151};
152153const handleIncreaseQuantity = async (e: React.MouseEvent) => {
154e.stopPropagation();
155285product: any;
286activeProductId: string | null;
287setActiveProductId: React.Dispatch<React.SetStateAction<string>>;
288},
289) {
311}, [isActive, setActiveProductId]);
312313const handleButtonClick = async (e: React.MouseEvent) => {
314e.stopPropagation();
315326};
327328const handleQuantitySelectorClick = (e: React.MouseEvent) => {
329e.stopPropagation();
330};
331332const handleDecreaseQuantity = async (e: React.MouseEvent) => {
333e.stopPropagation();
334355};
356357const handleIncreaseQuantity = async (e: React.MouseEvent) => {
358e.stopPropagation();
359439}
440441function ProductCarousel({ children }: { children: React.ReactNode }) {
442const [emblaRef, emblaApi] = useEmblaCarousel({
443axis: "x",
11901191app.get("*", async (c) => {
1192const { id, init, lookup, tx } = await import("https://esm.sh/@instantdb/admin@0.19.2?bundle-deps&deps=react@18.2.0");
1193const db = init({
1194appId: "880cb820-b987-4019-9b0a-7805721e74d2",
createInteractionForm.tsx4 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState } from "https://esm.sh/react@18.2.0";
3import { Interaction, InteractionType } from "../../shared/types.ts";
41718const handleChange = (
19e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>
20) => {
21const { name, value } = e.target;
47};
4849const handleSubmit = (e: React.FormEvent) => {
50e.preventDefault();
51
createContactDetail.tsx2 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { Contact, Interaction, InteractionType } from "../../shared/types.ts";
4import InteractionForm from "./InteractionForm.tsx";
createContactForm.tsx4 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState } from "https://esm.sh/react@18.2.0";
3import { Contact } from "../../shared/types.ts";
420const [errors, setErrors] = useState<Record<string, string>>({});
2122const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
23const { name, value } = e.target;
24setFormData(prev => ({ ...prev, [name]: value }));
49};
5051const handleSubmit = (e: React.FormEvent) => {
52e.preventDefault();
53
createContactList.tsx2 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { Contact } from "../../shared/types.ts";
4