Multiple minor changes and improvements
This commit is contained in:
@@ -6,14 +6,14 @@
|
||||
* worker should land on.
|
||||
*/
|
||||
|
||||
const ROUTES = ['resume', 'today', 'settings', 'stats'];
|
||||
const ROUTES = ['resume', 'today', 'settings', 'stats', 'details', 'automations', 'non-working'];
|
||||
|
||||
function fromHash() {
|
||||
const h = location.hash.replace(/^#\/?/, '');
|
||||
return ROUTES.includes(h) ? h : null;
|
||||
}
|
||||
|
||||
export const router = $state({ route: fromHash() });
|
||||
export const router = $state({ route: fromHash(), selectedDate: '' });
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
router.route = fromHash();
|
||||
|
||||
Reference in New Issue
Block a user