react_client_forkmain.tsx3 matches
4import { blob } from "https://esm.town/v/std/blob?v=10";
56function App({ initialTodos }: { initialTodos: { text: string; }[]; }) {
7const [todos, setTodos] = useState<{ text: string; }[]>(Array.isArray(initialTodos) ? initialTodos : []);
8const [newTodo, setNewTodo] = useState("");
109}
110111function client() {
112const fetchTodos = async () => {
113const response = await fetch('/todos');
123if (typeof document !== "undefined") { client(); }
124125export default async function server(request: Request) {
126if (request.method === 'POST' && request.url.endsWith('/add-todo')) {
127const body = await request.json();
sitesUptimeMonitormain.tsx2 matches
6);
78export async function uptimeCheck(url: string) {
9let ok = true;
10let reason: string;
40}
4142export default async function(interval: Interval) {
43["https://opanujfrontend.pl", "https://opanujtypescript.pl", "https://opanuj.ai", "https://przeprogramowani.pl"]
44.forEach(uptimeCheck);
tenderAmethystScallopmain.tsx3 matches
4import { jsPDF } from "https://esm.sh/jspdf@2.5.1";
56function ImageToPDFConverter() {
7const [size, setSize] = useState('A4');
8const [customWidth, setCustomWidth] = useState('');
115}
116117export default function handler(req: Request) {
118const html = renderToString(
119<html lang="en">
148}
149150function client() {
151const root = document.getElementById('root');
152if (root) {
imagetopdfmain.tsx3 matches
4import { jsPDF } from "https://esm.sh/jspdf@2.5.1";
56function ImageToPDFConverter() {
7const [size, setSize] = useState('A4');
8const [customWidth, setCustomWidth] = useState('');
115}
116117export default function handler(req: Request) {
118const html = renderToString(
119<html lang="en">
148}
149150function client() {
151const root = document.getElementById('root');
152if (root) {
weatherBasedActivityAlertingmain.tsx6 matches
25///////////////////////
2627// Helper function to get day of week
28function getDayOfWeek(dateString: string): string {
29const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
30return days[new Date(dateString).getDay()];
31}
3233// Helper function to format date as MM/DD
34function formatDate(dateString: string): string {
35const date = new Date(dateString);
36return `${date.getMonth() + 1}/${date.getDate()}`;
3839// Dynamically extract unique metrics from activities
40function extractUniqueMetrics(activityDefinitions: typeof activities): string[] {
41const metricsSet = new Set<string>();
42Object.values(activityDefinitions).forEach(activity => {
46}
4748export default async function() {
49try {
50// Dynamically generate metrics list
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"));
valTownInspoListmain.tsx1 match
119}, {
120"title": "Generate PDFs",
121"description": "Generate PDFs using val functions by using an external library like jsPDF",
122"val": "@vtdocs.examplePDF",
123image:
reMarkableXNYTCrosswordmain.tsx2 matches
3import request from "npm:request";
45export default async function(interval: Interval) {
6// Cookies and Tokens -> use `mitmweb` to navigate to NYTimes.com to grab cookie. Repeat for my.remarkable.com
763},
64})
65.then(function(response) {
66var rmMetadata = { "parent": rmFolderGuid, "file_name": puzzleFriendlyName };
67
randomVideoChatAppmain.tsx4 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function RandomVideoChat() {
6const [connectionStatus, setConnectionStatus] = useState("Disconnected");
7const [isSearching, setIsSearching] = useState(false);
167}
168169function App() {
170return <RandomVideoChat />;
171}
172173function client() {
174createRoot(document.getElementById("root")).render(<App />);
175}
176if (typeof document !== "undefined") { client(); }
177178export default async function server(request: Request): Promise<Response> {
179return new Response(`
180<html>
valTownInspoListmain.tsx1 match
119}, {
120"title": "Generate PDFs",
121"description": "Generate PDFs using val functions by using an external library like jsPDF",
122"val": "@vtdocs.examplePDF",
123image: