MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / renderBootError

Function renderBootError

apps/desktop/src/renderer/main.tsx:7–18  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

5const root = document.getElementById('root')
6
7function renderBootError(message: string): void {
8 if (!root) return
9 root.replaceChildren()
10 const pre = document.createElement('pre')
11 pre.style.padding = '24px'
12 pre.style.color = '#b42318'
13 pre.style.background = '#fff7f7'
14 pre.style.font = '14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace'
15 pre.style.whiteSpace = 'pre-wrap'
16 pre.textContent = message
17 root.appendChild(pre)
18}
19
20// Once the app has mounted, a stray async error must NOT blow away the whole
21// UI — `renderBootError` wipes #root, so reserve it for failures that happen

Callers 1

main.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected