27 lines · 924 B · TypeScript
RawDownload
/** Shows startup failures before React can replace the boot splash. */export function showBootError(error: unknown) {  console.error("T3 Code failed to start.", error);  const bootShell = document.getElementById("boot-shell");  if (!bootShell) return;   const content = document.createElement("div");  content.id = "boot-error";  content.setAttribute("role", "alert");   const message = document.createElement("p");  message.textContent = "T3 Code could not load.";  content.append(message);   if (import.meta.env.DEV && error instanceof Error) {    const detail = document.createElement("p");    detail.textContent = error.message;    content.append(detail);  }   const reload = document.createElement("button");  reload.type = "button";  reload.textContent = "Reload";  reload.addEventListener("click", () => window.location.reload());  content.append(reload);  bootShell.replaceChildren(content);}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t