Add variable extraction for folder hash consistency
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
parent
5393045dfd
commit
7805a7bd35
|
@ -65,7 +65,8 @@ function popstateHandler(): void {
|
|||
|
||||
onMounted(() => {
|
||||
// Push a new history state with a unique hash when the folder page opens
|
||||
window.history.pushState(null, '', `#folder-${props.pageId}`);
|
||||
const folderHash = `#folder-${props.pageId}`;
|
||||
window.history.pushState(null, '', folderHash);
|
||||
|
||||
// Listen for popstate events (browser back button)
|
||||
window.addEventListener('popstate', popstateHandler);
|
||||
|
|
Loading…
Reference in New Issue