mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-16 22:36:03 +02:00
Don't push history when we've gotten here via popstate
This commit is contained in:
@@ -89,7 +89,9 @@ export function useAppShell(): UseAppShellResult {
|
||||
const handlePopstate = () => {
|
||||
const section = parseHashSettingsSection();
|
||||
if (section !== null) {
|
||||
pushedSettingsEntryRef.current = true;
|
||||
// Don't set pushedSettingsEntryRef here — the user arrived via
|
||||
// back/forward, not by opening settings. Closing settings should
|
||||
// replaceState, not history.back(), to avoid popping an unrelated entry.
|
||||
startTransition(() => {
|
||||
setShowSettings(true);
|
||||
setSettingsSection(section);
|
||||
|
||||
Reference in New Issue
Block a user