connect request form v2 to sidebar nav
Summary: If the GK is enabled, get the new litho support form from the sidebar! Reviewed By: jknoxville Differential Revision: D18639060 fbshipit-source-id: c10a32fc4725374dbd6d89e16944642d3124037e
This commit is contained in:
committed by
Facebook Github Bot
parent
fef8d5a50f
commit
e7ad713df8
@@ -54,6 +54,7 @@ import {BackgroundColorProperty} from 'csstype';
|
|||||||
import {StyledOtherComponent} from 'create-emotion-styled';
|
import {StyledOtherComponent} from 'create-emotion-styled';
|
||||||
import SupportRequestFormManager from '../fb-stubs/SupportRequestFormManager';
|
import SupportRequestFormManager from '../fb-stubs/SupportRequestFormManager';
|
||||||
import SupportRequestDetails from '../fb-stubs/SupportRequestDetails';
|
import SupportRequestDetails from '../fb-stubs/SupportRequestDetails';
|
||||||
|
import SupportRequestFormV2 from '../fb-stubs/SupportRequestFormV2';
|
||||||
|
|
||||||
type FlipperPlugins = typeof FlipperPlugin[];
|
type FlipperPlugins = typeof FlipperPlugin[];
|
||||||
type PluginsByCategory = [string, FlipperPlugins][];
|
type PluginsByCategory = [string, FlipperPlugins][];
|
||||||
@@ -405,27 +406,25 @@ class MainSidebar extends PureComponent<Props, State> {
|
|||||||
</PluginName>
|
</PluginName>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
)}
|
)}
|
||||||
{this.state.showSupportForm && (
|
{this.state.showSupportForm &&
|
||||||
|
(function() {
|
||||||
|
const supportRequestFormImpl = GK.get('support_requests_v2')
|
||||||
|
? SupportRequestFormV2
|
||||||
|
: SupportRequestFormManager;
|
||||||
|
const active = staticView && staticView === supportRequestFormImpl;
|
||||||
|
return (
|
||||||
<ListItem
|
<ListItem
|
||||||
active={
|
active={active}
|
||||||
staticView != null && staticView === SupportRequestFormManager
|
onClick={() => setStaticView(supportRequestFormImpl)}>
|
||||||
}
|
|
||||||
onClick={() => setStaticView(SupportRequestFormManager)}>
|
|
||||||
<PluginIcon
|
<PluginIcon
|
||||||
color={colors.light50}
|
color={colors.light50}
|
||||||
name={'app-dailies'}
|
name={'app-dailies'}
|
||||||
isActive={
|
isActive={active}
|
||||||
staticView != null && staticView === SupportRequestFormManager
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<PluginName
|
<PluginName isActive={active}>Litho Support Request</PluginName>
|
||||||
isActive={
|
|
||||||
staticView != null && staticView === SupportRequestFormManager
|
|
||||||
}>
|
|
||||||
Litho Support Request
|
|
||||||
</PluginName>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
)}
|
);
|
||||||
|
})()}
|
||||||
<ListItem
|
<ListItem
|
||||||
onClick={() => this.props.setActiveSheet(ACTIVE_SHEET_PLUGINS)}>
|
onClick={() => this.props.setActiveSheet(ACTIVE_SHEET_PLUGINS)}>
|
||||||
<PluginIcon
|
<PluginIcon
|
||||||
|
|||||||
Reference in New Issue
Block a user