Back

Version 37

1/21/2025
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState, useEffect, useMemo } from "https://esm.sh/react@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import SyntaxHighlighter from "https://esm.sh/react-syntax-highlighter@15.5.0";
import { materialDark } from "https://esm.sh/react-syntax-highlighter@15.5.0/dist/esm/styles/prism";

// Toast Component for notifications
const Toast = ({ message, type = 'success', onClose }) => {
useEffect(() => {
const timer = setTimeout(onClose, 3000);
return () => clearTimeout(timer);
}, [onClose]);

return (
<div className={`toast ${type}`}>
{message}
</div>
);
};

function PostmanCloneApp() {
const [collections, setCollections] = useState([
{
id: crypto.randomUUID(),
name: "User Management",
requests: [
{
id: crypto.randomUUID(),
name: "Create User",
method: "POST",
url: "/users",
description: "Create a new user account",
},
],
},
]);
gokulnpc-prosperousyellowmule.web.val.run
Updated: January 21, 2025