Remove the gk
Summary: We have already rolled out `support_requests_v2` to 100% of FB employees. Thus removing the unneeded checks for the GK. Reviewed By: jknoxville Differential Revision: D19770930 fbshipit-source-id: 06fcf7b6b7c1305ab1b5b3c8df344e2877251e65
This commit is contained in:
committed by
Facebook Github Bot
parent
b9fafb0e61
commit
c52ca255bb
@@ -215,7 +215,6 @@ function getTemplate(
|
|||||||
submenu: exportSubmenu,
|
submenu: exportSubmenu,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
if (GK.get('support_requests_v2')) {
|
|
||||||
const supportRequestSubmenu = [
|
const supportRequestSubmenu = [
|
||||||
{
|
{
|
||||||
label: 'Create...',
|
label: 'Create...',
|
||||||
@@ -229,7 +228,6 @@ function getTemplate(
|
|||||||
label: 'Support Requests',
|
label: 'Support Requests',
|
||||||
submenu: supportRequestSubmenu,
|
submenu: supportRequestSubmenu,
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
const template: MenuItemConstructorOptions[] = [
|
const template: MenuItemConstructorOptions[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -197,14 +197,12 @@ type DispatchFromProps = {
|
|||||||
|
|
||||||
type Props = OwnProps & StateFromProps & DispatchFromProps;
|
type Props = OwnProps & StateFromProps & DispatchFromProps;
|
||||||
type State = {
|
type State = {
|
||||||
showSupportForm: boolean;
|
|
||||||
showWatchDebugRoot: boolean;
|
showWatchDebugRoot: boolean;
|
||||||
showAllPlugins: boolean;
|
showAllPlugins: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MainSidebar2 extends PureComponent<Props, State> {
|
class MainSidebar2 extends PureComponent<Props, State> {
|
||||||
state: State = {
|
state: State = {
|
||||||
showSupportForm: GK.get('support_requests_v2'),
|
|
||||||
showWatchDebugRoot: GK.get('watch_team_flipper_clientless_access'),
|
showWatchDebugRoot: GK.get('watch_team_flipper_clientless_access'),
|
||||||
showAllPlugins: false,
|
showAllPlugins: false,
|
||||||
};
|
};
|
||||||
@@ -332,8 +330,7 @@ class MainSidebar2 extends PureComponent<Props, State> {
|
|||||||
{device.source ? 'Imported device' : 'Archived device'}
|
{device.source ? 'Imported device' : 'Archived device'}
|
||||||
</Info>
|
</Info>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
{this.state.showSupportForm &&
|
{(device as ArchivedDevice).supportRequestDetails && (
|
||||||
(device as ArchivedDevice).supportRequestDetails && (
|
|
||||||
<ListItem
|
<ListItem
|
||||||
active={supportRequestDetailsactive}
|
active={supportRequestDetailsactive}
|
||||||
onClick={() => setStaticView(SupportRequestDetails)}>
|
onClick={() => setStaticView(SupportRequestDetails)}>
|
||||||
|
|||||||
@@ -52,13 +52,6 @@ function MainSidebarUtilsSection({
|
|||||||
}: Props) {
|
}: Props) {
|
||||||
const showWatchDebugRoot = GK.get('watch_team_flipper_clientless_access');
|
const showWatchDebugRoot = GK.get('watch_team_flipper_clientless_access');
|
||||||
|
|
||||||
const hasSeenSupportForm = useRef(false);
|
|
||||||
const showSupportForm =
|
|
||||||
GK.get('support_requests_v2') || hasSeenSupportForm.current;
|
|
||||||
if (showSupportForm) {
|
|
||||||
hasSeenSupportForm.current = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{flexShrink: 0, borderTop: `1px solid ${colors.blackAlpha10}`}}>
|
<div style={{flexShrink: 0, borderTop: `1px solid ${colors.blackAlpha10}`}}>
|
||||||
{showWatchDebugRoot &&
|
{showWatchDebugRoot &&
|
||||||
@@ -81,8 +74,7 @@ function MainSidebarUtilsSection({
|
|||||||
);
|
);
|
||||||
})()}
|
})()}
|
||||||
<RenderNotificationsEntry />
|
<RenderNotificationsEntry />
|
||||||
{showSupportForm &&
|
{(function() {
|
||||||
(function() {
|
|
||||||
const active = isStaticViewActive(staticView, SupportRequestFormV2);
|
const active = isStaticViewActive(staticView, SupportRequestFormV2);
|
||||||
return (
|
return (
|
||||||
<ListItem
|
<ListItem
|
||||||
|
|||||||
Reference in New Issue
Block a user