From 4765bdd3de4dbaae2bfe78b6a1a4287ed316ff9d Mon Sep 17 00:00:00 2001 From: Luke Donahue Date: Fri, 27 May 2022 15:37:19 -0700 Subject: [PATCH 1/8] disable submit button and render offline indicator --- src/components/FormAlertWithSubmitButton.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/components/FormAlertWithSubmitButton.js b/src/components/FormAlertWithSubmitButton.js index 8647ceecf014..e0351d856d5b 100644 --- a/src/components/FormAlertWithSubmitButton.js +++ b/src/components/FormAlertWithSubmitButton.js @@ -11,6 +11,8 @@ import withLocalize, {withLocalizePropTypes} from './withLocalize'; import TextLink from './TextLink'; import Text from './Text'; import RenderHTML from './RenderHTML'; +import OfflineIndicator from './OfflineIndicator'; +import {withNetwork} from './OnyxProvider'; const propTypes = { /** Whether to show the alert text */ @@ -95,6 +97,19 @@ const FormAlertWithSubmitButton = (props) => { ); } + if (props.network.isOffline) { + return ( + +