autobrr/web/src/index.tsx
stacksmash76 7b77ff766e
enhancement(web): improve font loading performance and avoid page reflow (#1087)
* enhancement: improve font loading performance and avoid page reflow

chore: get rid of postcss-import (we're not using it and it's not needed for tailwind)

* fix indent
2023-09-09 23:07:00 +02:00

34 lines
863 B
TypeScript

/*
* Copyright (c) 2021 - 2023, Ludvig Lundgren and the autobrr contributors.
* SPDX-License-Identifier: GPL-2.0-or-later
*/
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { Buffer } from "buffer";
import "./index.css";
import "react-tooltip/dist/react-tooltip.css";
import { App } from "./App";
import { InitializeGlobalContext } from "./utils/Context";
declare global {
interface Window { APP: APP; }
}
window.APP = window.APP || {};
// Apparently Stacktracey requires this for some weird reason
// (at least in local dev env)
window.Buffer = Buffer;
// Initializes auth and theme contexts
InitializeGlobalContext();
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const root = createRoot(document.getElementById("root")!);
root.render(
<StrictMode>
<App />
</StrictMode>
);