From 665bfee8e0df4d770aa185654fec85b16c2d53f9 Mon Sep 17 00:00:00 2001 From: lendihop Date: Thu, 28 Nov 2024 23:11:03 +0100 Subject: [PATCH] fix some minor bugs --- src/app/atoms/FormField.tsx | 2 +- src/app/layouts/PageLayout/index.tsx | 14 ++++++++++---- src/app/pages/Unlock/Unlock.tsx | 7 ++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/app/atoms/FormField.tsx b/src/app/atoms/FormField.tsx index aa435c437..f1f445aa4 100644 --- a/src/app/atoms/FormField.tsx +++ b/src/app/atoms/FormField.tsx @@ -390,7 +390,7 @@ const ErrorCaption: React.FC = ({ errorCaption }) => { const isPasswordStrengthIndicator = errorCaption === PASSWORD_ERROR_CAPTION; return errorCaption && !isPasswordStrengthIndicator ? ( -
+
{errorCaption}
) : null; diff --git a/src/app/layouts/PageLayout/index.tsx b/src/app/layouts/PageLayout/index.tsx index 506ab4abb..1229f3d81 100644 --- a/src/app/layouts/PageLayout/index.tsx +++ b/src/app/layouts/PageLayout/index.tsx @@ -46,6 +46,7 @@ export interface PageLayoutProps extends DefaultHeaderProps, ScrollEdgesVisibili Header?: ComponentType; noScroll?: boolean; contentPadding?: boolean; + showTestnetModeIndicator?: boolean; contentClassName?: string; paperClassName?: string; headerChildren?: ReactNode; @@ -56,6 +57,7 @@ const PageLayout: FC> = ({ children, noScroll = false, contentPadding = true, + showTestnetModeIndicator = true, contentClassName, paperClassName, headerChildren, @@ -86,6 +88,7 @@ const PageLayout: FC> = ({ bottomEdgeThreshold={bottomEdgeThreshold} onTopEdgeVisibilityChange={onTopEdgeVisibilityChange} topEdgeThreshold={topEdgeThreshold} + showTestnetModeIndicator={showTestnetModeIndicator} > {Header ?
: {headerChildren}} @@ -125,7 +128,9 @@ const PageLayout: FC> = ({ export default PageLayout; -type ContentPaperProps = PropsWithChildren<{ className?: string } & ScrollEdgesVisibilityProps>; +type ContentPaperProps = PropsWithChildren< + { showTestnetModeIndicator?: boolean; className?: string } & ScrollEdgesVisibilityProps +>; const ContentPaper: FC = ({ children, @@ -133,7 +138,8 @@ const ContentPaper: FC = ({ bottomEdgeThreshold, topEdgeThreshold, onBottomEdgeVisibilityChange, - onTopEdgeVisibilityChange + onTopEdgeVisibilityChange, + showTestnetModeIndicator = true }) => { const appEnv = useAppEnv(); const rootRef = useRef(null); @@ -159,7 +165,7 @@ const ContentPaper: FC = ({ className )} > - + {showTestnetModeIndicator && } {children} @@ -177,7 +183,7 @@ const TestnetModeIndicator = memo(() => { return (
= ({ canImportNew = true }) => { }, [timelock, lockLevel, setTimeLock]); return ( - +