2021-06-23 14:52:33 +01:00
|
|
|
import { BrowserRouter as Router } from "react-router-dom";
|
2021-06-18 17:57:08 +01:00
|
|
|
|
2021-07-05 11:23:23 +01:00
|
|
|
import State from "../redux/State";
|
|
|
|
|
|
|
|
import { Children } from "../types/Preact";
|
2021-06-18 17:57:08 +01:00
|
|
|
import Locale from "./Locale";
|
|
|
|
import Theme from "./Theme";
|
2021-07-05 11:23:23 +01:00
|
|
|
import Intermediate from "./intermediate/Intermediate";
|
|
|
|
import Client from "./revoltjs/RevoltClient";
|
2021-06-18 17:57:08 +01:00
|
|
|
|
2021-12-10 12:53:41 +00:00
|
|
|
/**
|
|
|
|
* This component provides all of the application's context layers.
|
|
|
|
* @param param0 Provided children
|
|
|
|
*/
|
2021-06-18 17:57:08 +01:00
|
|
|
export default function Context({ children }: { children: Children }) {
|
2021-07-05 11:25:20 +01:00
|
|
|
return (
|
2021-09-10 18:03:06 -04:00
|
|
|
<Router basename={import.meta.env.BASE_URL}>
|
2021-07-05 11:25:20 +01:00
|
|
|
<State>
|
2021-12-16 22:05:31 +00:00
|
|
|
<Locale>
|
|
|
|
<Intermediate>
|
|
|
|
<Client>{children}</Client>
|
|
|
|
</Intermediate>
|
|
|
|
</Locale>
|
2021-12-13 17:27:06 +00:00
|
|
|
<Theme />
|
2021-07-05 11:25:20 +01:00
|
|
|
</State>
|
|
|
|
</Router>
|
|
|
|
);
|
2021-06-18 17:57:08 +01:00
|
|
|
}
|