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:
committed by
Facebook GitHub Bot
parent
df9b0a6aa6
commit
dacc6ebb16
@@ -25,7 +25,7 @@ import {Inspector} from './sidebar/Inspector';
|
|||||||
import {Controls} from './Controls';
|
import {Controls} from './Controls';
|
||||||
import {Spin} from 'antd';
|
import {Spin} from 'antd';
|
||||||
import {QueryClientProvider} from 'react-query';
|
import {QueryClientProvider} from 'react-query';
|
||||||
|
import FeedbackRequest from './fb-stubs/feedback';
|
||||||
import {Tree2} from './Tree';
|
import {Tree2} from './Tree';
|
||||||
|
|
||||||
export function Component() {
|
export function Component() {
|
||||||
@@ -49,6 +49,7 @@ export function Component() {
|
|||||||
return (
|
return (
|
||||||
<QueryClientProvider client={instance.queryClient}>
|
<QueryClientProvider client={instance.queryClient}>
|
||||||
<Layout.Container grow padh="small" padv="medium">
|
<Layout.Container grow padh="small" padv="medium">
|
||||||
|
{instance.device === 'iOS' ? <FeedbackRequest /> : null}
|
||||||
<Controls />
|
<Controls />
|
||||||
<Layout.Horizontal grow pad="small" gap="small">
|
<Layout.Horizontal grow pad="small" gap="small">
|
||||||
<Layout.Container grow gap="small">
|
<Layout.Container grow gap="small">
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ export function plugin(client: PluginClient<Events>) {
|
|||||||
const rootId = createState<Id | undefined>(undefined);
|
const rootId = createState<Id | undefined>(undefined);
|
||||||
const metadata = createState<Map<MetadataId, Metadata>>(new Map());
|
const metadata = createState<Map<MetadataId, Metadata>>(new Map());
|
||||||
|
|
||||||
|
const device = client.device.os;
|
||||||
|
|
||||||
client.onMessage('init', (event) => {
|
client.onMessage('init', (event) => {
|
||||||
rootId.set(event.rootId);
|
rootId.set(event.rootId);
|
||||||
});
|
});
|
||||||
@@ -179,6 +181,7 @@ export function plugin(client: PluginClient<Events>) {
|
|||||||
perfEvents,
|
perfEvents,
|
||||||
setPlayPause,
|
setPlayPause,
|
||||||
queryClient,
|
queryClient,
|
||||||
|
device,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user