diff --git a/src/components/Error.tsx b/src/components/Error.tsx index 9d5b7ebe3a..e4d60c3d35 100644 --- a/src/components/Error.tsx +++ b/src/components/Error.tsx @@ -32,7 +32,6 @@ export function Error({ const {t: l} = useLingui() const t = useTheme() const {gtMobile} = useBreakpoints() - const goBack = useGoBack(onGoBack) return ( } )} - {!hideBackButton && ( + {!hideBackButton && secondaryAction ? ( - )} + ) : !hideBackButton ? ( + + ) : null} ) } + +function GoBackButton({ + hasRetry, + isRetrying, + onGoBack, +}: { + hasRetry: boolean + isRetrying?: boolean + onGoBack?: () => unknown +}) { + const {t: l} = useLingui() + const goBack = useGoBack(onGoBack) + + return ( + + ) +}