mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-07 09:13:04 +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 handlePopstate = () => {
|
||||||
const section = parseHashSettingsSection();
|
const section = parseHashSettingsSection();
|
||||||
if (section !== null) {
|
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(() => {
|
startTransition(() => {
|
||||||
setShowSettings(true);
|
setShowSettings(true);
|
||||||
setSettingsSection(section);
|
setSettingsSection(section);
|
||||||
|
|||||||
Reference in New Issue
Block a user