mirror of
https://github.com/Lapikud/lapikud.github.io.git
synced 2026-08-08 20:39:14 +00:00
mentors update + navbar bug fixes
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<script>
|
||||
export function routeTo(path) {
|
||||
window.history.pushState({}, "", path);
|
||||
window.scrollTo(0, 0);
|
||||
window.dispatchEvent(new PopStateEvent("popstate"));
|
||||
}
|
||||
|
||||
@@ -14,6 +15,7 @@
|
||||
|
||||
function navigate(path) {
|
||||
window.history.pushState({}, "", path);
|
||||
window.scrollTo(0, 0);
|
||||
currentPath = path;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ export function navigate(path, options = {}) {
|
||||
const resolvedPath = getTranslatedRoute(path, selectedLang);
|
||||
|
||||
window.history.pushState({}, "", resolvedPath);
|
||||
window.scrollTo(0, 0);
|
||||
window.dispatchEvent(new PopStateEvent('popstate'));
|
||||
|
||||
// Update language based on new route
|
||||
|
||||
Reference in New Issue
Block a user