refactor(web): async routing

This commit is contained in:
Paul Armstrong
2021-02-07 13:46:05 -08:00
committed by Blake Blackshear
parent 24ec13e36d
commit 7aee28d080
14 changed files with 95 additions and 93 deletions

29
web/src/routes/index.js Normal file
View File

@@ -0,0 +1,29 @@
export async function getCameraMap(url, cb, props) {
const module = await import('./CameraMap.jsx');
return module.default;
}
export async function getCamera(url, cb, props) {
const module = await import('./Camera.jsx');
return module.default;
}
export async function getEvent(url, cb, props) {
const module = await import('./Event.jsx');
return module.default;
}
export async function getEvents(url, cb, props) {
const module = await import('./Events.jsx');
return module.default;
}
export async function getDebug(url, cb, props) {
const module = await import('./Debug.jsx');
return module.default;
}
export async function getStyleGuide(url, cb, props) {
const module = await import('./StyleGuide.jsx');
return module.default;
}