this repo has no description
1let currentPath = $state(window.location.hash.slice(1) || '/') 2 3window.addEventListener('hashchange', () => { 4 currentPath = window.location.hash.slice(1) || '/' 5}) 6 7export function navigate(path: string) { 8 window.location.hash = path 9} 10 11export function getCurrentPath() { 12 return currentPath 13}