From 17f57a1d7d0fa47aa6f5fa97c803063734615173 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Tue, 6 Aug 2024 22:34:27 +0200 Subject: [PATCH] fix(post form): opening settings would close post form --- src/app.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index 599aa91f..81a67d78 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -33,8 +33,10 @@ const BoardLayout = () => { return ; } - // force rerender of post form when navigating between pages - const key = `${subplebbitAddress}-${location.pathname}`; + // force rerender of post form when navigating between pages, except when opening settings modal in current view + const key = location.pathname.endsWith('/settings') + ? `${subplebbitAddress}-${location.pathname.replace(/\/settings$/, '')}` + : `${subplebbitAddress}-${location.pathname}`; return (