From 70b0580fb7e51110d2b6624268e35621db6b647d Mon Sep 17 00:00:00 2001 From: H0llyW00dzZ Date: Tue, 26 Sep 2023 04:59:19 +0700 Subject: [PATCH] UI Page [sidebar] [+] fix(sidebar.tsx): update onClick function to conditionally navigate to different paths based on config.dontShowMaskSplashScreen value Ref : [Feature] Make the mask selection more streamlined Yidadaa#2895 --- app/components/sidebar.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/components/sidebar.tsx b/app/components/sidebar.tsx index 3ca1678963e..6212d05d982 100644 --- a/app/components/sidebar.tsx +++ b/app/components/sidebar.tsx @@ -160,7 +160,13 @@ export function SideBar(props: { className?: string }) { icon={} text={shouldNarrow ? undefined : Locale.Mask.Name} className={styles["sidebar-bar-button"]} - onClick={() => navigate(Path.NewChat, { state: { fromHome: true } })} + onClick={() => { + if (config.dontShowMaskSplashScreen !== true) { + navigate(Path.NewChat, { state: { fromHome: true } }); + } else { + navigate(Path.Masks, { state: { fromHome: true } }); + } + }} shadow />