1 // Copyright 2020 Blue Static <https://www.bluestatic.org>
2 // This program is free software licensed under the GNU General Public License,
3 // version 3.0. The full text of the license can be found in LICENSE.txt.
4 // SPDX-License-Identifier: GPL-3.0-only
6 import { createSignal } from 'solid-js';
7 import { Show, render } from 'solid-js/dom';
8 import { TaxReturn } from 'ustaxlib/core';
10 import App from './App';
12 declare const TAX_RETURN_PATH: string;
14 function TaxViewerLoader() {
15 const [ state, setState ] = createSignal(undefined as TaxReturn);
17 // TODO - consider using dynamic import()
18 setState(require(TAX_RETURN_PATH).default);
21 <Show when={state() !== undefined} fallback={<h1>Loading...</h1>}>
27 render(TaxViewerLoader, document.getElementById('root'));