summaryrefslogtreecommitdiff
path: root/src/bootstrap.js
blob: 4b073bcbb3459d39026fef7b4e49617dbc0dde7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import './styles.css';
import { createApp } from './app/create-app.js';

const root = document.getElementById('app');

if (!root) {
    throw new Error('App root not found');
}

createApp(root).catch((error) => {
    console.error('Failed to start TimePlot', error);
    root.innerHTML = `
        <div style="padding: 24px; color: #fff; font-family: sans-serif;">
            <h1>TimePlot failed to start</h1>
            <pre>${String(error)}</pre>
        </div>
    `;
});