Feedback request

Summary:
^

Only for iOS this time.

Note: passing the device OS freely to the main component as this is just temporary code that will be deleted soon.

Reviewed By: antonk52

Differential Revision: D42990221

fbshipit-source-id: 41b4107caa6bf312191889af75afd28873f6eda5
This commit is contained in:
Lorenzo Blasa
2023-02-03 07:43:00 -08:00
committed by Facebook GitHub Bot
parent df9b0a6aa6
commit dacc6ebb16
2 changed files with 5 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ import {Inspector} from './sidebar/Inspector';
import {Controls} from './Controls';
import {Spin} from 'antd';
import {QueryClientProvider} from 'react-query';
import FeedbackRequest from './fb-stubs/feedback';
import {Tree2} from './Tree';
export function Component() {
@@ -49,6 +49,7 @@ export function Component() {
return (
<QueryClientProvider client={instance.queryClient}>
<Layout.Container grow padh="small" padv="medium">
{instance.device === 'iOS' ? <FeedbackRequest /> : null}
<Controls />
<Layout.Horizontal grow pad="small" gap="small">
<Layout.Container grow gap="small">

View File

@@ -45,6 +45,8 @@ export function plugin(client: PluginClient<Events>) {
const rootId = createState<Id | undefined>(undefined);
const metadata = createState<Map<MetadataId, Metadata>>(new Map());
const device = client.device.os;
client.onMessage('init', (event) => {
rootId.set(event.rootId);
});
@@ -179,6 +181,7 @@ export function plugin(client: PluginClient<Events>) {
perfEvents,
setPlayPause,
queryClient,
device,
};
}