when-free.openapps.xyz

Source

This app’s code and revision history are public. Download a copy or explore the files below.

Public
The app’s code and revision history are public.
Owned app · rev 2315d847681e
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone 3e1cb86700a5e96238d7a2f1
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
← All files
src/main.tsx
// When's entry. "/" keeps the static landing and mounts the poll maker and "Your polls" into it;
// "/p/<id>" hides the landing and shows the poll ("/p/<id>/admin#k=<key>" claims it, "/p/<id>/edit" edits it).
// The poll page and the Bounded SDK load on demand, so the landing stays light.
import { lazy, Suspense } from "react";
import { createRoot } from "react-dom/client";
import { usePath } from "./lib/router";
import { Toaster, PollSkeleton } from "./ui";
import { Editor } from "./Editor";
import { YourPolls } from "./Home";
import "./styles.css";

const PollPage = lazy(() => import("./Poll").then((m) => ({ default: m.PollPage })));

function App() {
  const path = usePath();
  const poll = path.match(/^\/p\/([A-Za-z0-9]{8,32})(?:\/(admin|edit))?\/?$/);
  document.body.classList.toggle("app-mode", Boolean(poll));
  return (
    <>
      {poll ? (
        <Suspense fallback={<PollSkeleton />}>
          <PollPage key={poll[1] + (poll[2] === "edit" ? ":edit" : "")} pollId={poll[1]} view={(poll[2] as "admin" | "edit") || "poll"} />
        </Suspense>
      ) : null}
      <Toaster />
    </>
  );
}

createRoot(document.getElementById("app")!).render(<App />);
const createSlot = document.getElementById("create");
if (createSlot) createRoot(createSlot).render(<Editor mode="create" />);
const pollsSlot = document.getElementById("your-polls");
if (pollsSlot) createRoot(pollsSlot).render(<YourPolls />);

Change history

Quality pass: comments, CSV export, share the final time, calendar menu, fixes
2315d84768 · 4 hours ago
Bounded source sync
145324066b · 1 day ago
Bounded source sync
ad9b674dac · 1 day ago
Bounded source sync
e5b69608f3 · 1 day ago
Bounded source sync
a1685914b0 · 1 day ago
Bounded source sync
7108f42d4d · 1 day ago
Bounded source sync
ffb51b672e · 1 day ago
Bounded source sync
23b5d0c53b · 1 day ago