- 
                Notifications
    You must be signed in to change notification settings 
- Fork 297
Closed
Description
I can't get any UI to show:
 
I must be missing some step, but I checked all over and can't seem to find out what. I originally wrote my own app based on the examples and faced this issue but since decided to try a really basic "Hello World" demo to see if I could get something to show, but no joy.
Here is the code I added to the pizzaz example:
src/hello_world/index.jsx
import React from "react";
import { createRoot } from "react-dom/client";
function App() {
  return (
    <div className="antialiased w-full text-black p-8 flex items-center justify-center min-h-[200px]">
      <div className="text-center">
        <h1 className="text-6xl font-bold text-blue-600 mb-4">
          HELLO WORLD
        </h1>
        <p className="text-lg text-gray-600">
          This is a simple hello world widget!
        </p>
      </div>
    </div>
  );
}
createRoot(document.getElementById("hello_world-root")).render(<App />);I've added my tool here (ignore the lack of CSS and JS, I just want to get something to show up), all of the original examples like the pizza map work but my widget just show blank:
pizzaz_server_node/src/server.ts
const widgets: PizzazWidget[] = [
  {
    id: "hello-world",
    title: "Show Hello World",
    templateUri: "ui://widget/hello-world.html",
    invoking: "Displaying hello world",
    invoked: "Showed hello world",
    html: `
<div id="hello_world-root"></div>
    `.trim(),
    responseText: "Displayed hello world!"
  },
  {
    id: "pizza-map",
    title: "Show Pizza Map",
    templateUri: "ui://widget/pizza-map.html",
    invoking: "Hand-tossing a map",
    invoked: "Served a fresh map",
    html: `
<div id="pizzaz-root"></div>
<link rel="stylesheet" href="https://persistent.oaistatic.com/ecosystem-built-assets/pizzaz-0038.css">
<script type="module" src="https://persistent.oaistatic.com/ecosystem-built-assets/pizzaz-0038.js"></script>
    `.trim(),
    responseText: "Rendered a pizza map!"
  },
...
}Please could someone help me out, spent a few hours on it and cannot see what I am missing (I am new to React!), thanks 🙏🏼
akucherenko-mwb
Metadata
Metadata
Assignees
Labels
No labels