stash/ui/v2.5/src/index.tsx
InfiniteTF a4ed9515c7
Support subpaths when serving stash through a reverse proxy (#1719)
* Support subpaths when serving stash through a reverse proxy
* Add README documentation

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2021-09-21 14:12:10 +10:00

26 lines
904 B
TypeScript
Executable file

import React from "react";
import { ApolloProvider } from "@apollo/client";
import ReactDOM from "react-dom";
import { BrowserRouter } from "react-router-dom";
import { App } from "./App";
import { getClient } from "./core/StashService";
import { getPlatformURL, getBaseURL } from "./core/createClient";
import "./index.scss";
import * as serviceWorker from "./serviceWorker";
ReactDOM.render(
<>
<link rel="stylesheet" type="text/css" href={`${getPlatformURL()}css`} />
<BrowserRouter basename={getBaseURL()}>
<ApolloProvider client={getClient()}>
<App />
</ApolloProvider>
</BrowserRouter>
</>,
document.getElementById("root")
);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: http://bit.ly/CRA-PWA
serviceWorker.unregister();