Redirect to Support Entry Point
Reviewed By: mweststrate Differential Revision: D33091179 fbshipit-source-id: da0c3e5fc21eef1693f7da2d00d90347bf2e0b51
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ef74d01b11
commit
2c976546c7
@@ -12,3 +12,15 @@ export default function createPaste(
|
||||
): Promise<string | undefined> {
|
||||
return Promise.reject(new Error('Not implemented!'));
|
||||
}
|
||||
|
||||
export type CreatePasteResult = {
|
||||
number: number;
|
||||
url: string;
|
||||
};
|
||||
|
||||
export async function createPasteWithDetails(_details: {
|
||||
title?: string;
|
||||
content: string;
|
||||
}): Promise<CreatePasteResult | undefined> {
|
||||
return Promise.reject(new Error('Not implemented!'));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {State} from '../reducers';
|
||||
|
||||
export type SupportRequestDetails = {
|
||||
title?: string;
|
||||
whatAlreadyTried?: string;
|
||||
};
|
||||
|
||||
export default function openSupportRequestForm(
|
||||
_state: State,
|
||||
_details?: SupportRequestDetails,
|
||||
): void {
|
||||
throw new Error('Not implemented!');
|
||||
}
|
||||
@@ -67,6 +67,7 @@ import {
|
||||
import {openDeeplinkDialog} from '../deeplink';
|
||||
import {css} from '@emotion/css';
|
||||
import {getRenderHostInstance} from '../RenderHost';
|
||||
import openSupportRequestForm from '../fb-stubs/openSupportRequestForm';
|
||||
|
||||
const LeftRailButtonElem = styled(Button)<{kind?: 'small'}>(({kind}) => ({
|
||||
width: kind === 'small' ? 32 : 36,
|
||||
@@ -240,6 +241,8 @@ function ExtrasMenu() {
|
||||
const {showWelcomeAtStartup} = settings;
|
||||
const [welcomeVisible, setWelcomeVisible] = useState(showWelcomeAtStartup);
|
||||
|
||||
const fullState = useStore((state) => state);
|
||||
|
||||
return (
|
||||
<>
|
||||
<NUX
|
||||
@@ -283,7 +286,13 @@ function ExtrasMenu() {
|
||||
source: 'sidebar',
|
||||
group: undefined,
|
||||
});
|
||||
store.dispatch(setStaticView(SupportRequestFormV2));
|
||||
if (
|
||||
getRenderHostInstance().GK('flipper_support_entry_point')
|
||||
) {
|
||||
openSupportRequestForm(fullState);
|
||||
} else {
|
||||
store.dispatch(setStaticView(SupportRequestFormV2));
|
||||
}
|
||||
}}>
|
||||
Feedback
|
||||
</Menu.Item>
|
||||
|
||||
Reference in New Issue
Block a user