From 970c726720f065c2c5790f42dde5c79b5817751b Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Fri, 17 May 2024 16:28:09 +0200 Subject: [PATCH] feat(multisubs): add settings modal --- src/app.tsx | 12 ++++++------ src/lib/utils/view-utils.ts | 4 ++-- src/views/board/board.tsx | 2 +- src/views/catalog/catalog.tsx | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index 98a56633..40638493 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -70,22 +70,22 @@ const App = () => { }> } /> } /> - + } /> + } /> } /> } /> - } /> - } /> - } /> } /> + } /> + } /> + } /> + } /> } /> } /> - } /> } /> - } /> } /> diff --git a/src/lib/utils/view-utils.ts b/src/lib/utils/view-utils.ts index dbb6b595..7e794401 100644 --- a/src/lib/utils/view-utils.ts +++ b/src/lib/utils/view-utils.ts @@ -5,7 +5,7 @@ export type ParamsType = { }; export const isAllView = (pathname: string): boolean => { - return pathname === '/p/all'; + return pathname.startsWith('/p/all'); }; export const isCatalogView = (pathname: string, params: ParamsType): boolean => { @@ -40,7 +40,7 @@ export const isRulesView = (pathname: string, params: ParamsType): boolean => { }; export const isSubscriptionsView = (pathname: string): boolean => { - return pathname === '/p/subscriptions'; + return pathname.startsWith('/p/subscriptions'); }; export const isNotFoundView = (pathname: string, params: ParamsType): boolean => { diff --git a/src/views/board/board.tsx b/src/views/board/board.tsx index 464a02f3..407a632a 100644 --- a/src/views/board/board.tsx +++ b/src/views/board/board.tsx @@ -84,7 +84,7 @@ const Board = () => { return (
- {location.pathname === `/p/${subplebbitAddress}/settings` && } + {location.pathname.endsWith('/settings') && } {showReplyModal && activeCid && } {feed.length > 0 && ( <> diff --git a/src/views/catalog/catalog.tsx b/src/views/catalog/catalog.tsx index 1d60d82e..ac40284a 100644 --- a/src/views/catalog/catalog.tsx +++ b/src/views/catalog/catalog.tsx @@ -124,7 +124,7 @@ const Catalog = () => { return (
- {location.pathname === `/p/${subplebbitAddress}/catalog/settings` && } + {location.pathname.endsWith('/settings') && }