diff --git a/src/chrome/MainSidebar.tsx b/src/chrome/MainSidebar.tsx index 4f9f2cbe9..e8a594d61 100644 --- a/src/chrome/MainSidebar.tsx +++ b/src/chrome/MainSidebar.tsx @@ -245,7 +245,22 @@ type DispatchFromProps = { }; type Props = OwnProps & StateFromProps & DispatchFromProps; -class MainSidebar extends PureComponent { +type State = {showSupportForm: boolean}; +class MainSidebar extends PureComponent { + state: State = {showSupportForm: GK.get('flipper_support_requests')}; + static getDerivedStateFromProps(props: Props, state: State) { + if ( + !state.showSupportForm && + props.staticView === SupportRequestFormManager + ) { + // Show SupportForm option even when GK is false and support form is shown. + // That means the user has used deeplink to open support form. + // Once the variable is true, it will be true for the whole session. + return {showSupportForm: true}; + } + return state; + } + render() { const { selectedDevice, @@ -304,7 +319,7 @@ class MainSidebar extends PureComponent { )} - {GK.get('flipper_support_requests') && ( + {this.state.showSupportForm && (