client: setup some scaffolding for displaying tables, but it's nowhere near finished

This commit is contained in:
Starbeamrainbowlabs 2022-02-26 00:21:33 +00:00
parent 7e5b0725e9
commit 34f031a9e4
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
3 changed files with 12 additions and 2 deletions

View file

@ -0,0 +1,6 @@
"use strict";
export default async function(params) {
console.log(`TABLE ${params.table_name}`);
}

View file

@ -1,6 +1,7 @@
import ClientRouter from 'powahroot/Client.mjs';
import route_main from './routes/route_main.mjs';
import route_dashboard from './routes/route_dashboard.mjs';
import route_table from './routes/route_table.mjs';
export default function make_routes() {
const router = new ClientRouter({
@ -8,7 +9,10 @@ export default function make_routes() {
listen_pushstate: true
});
router.add_page("", route_main);
router.add_404(() => router.navigate(""));
router.add_page("table/:table_name", route_table);
router.add_page("", route_dashboard);
return router;
}