From a9256041ff8a79e4e3ba74bbd6cba4616726865a Mon Sep 17 00:00:00 2001 From: Anton Kastritskiy Date: Tue, 19 Nov 2024 03:54:01 -0800 Subject: [PATCH] fix react no unique key warning Reviewed By: mweststrate Differential Revision: D66096069 fbshipit-source-id: f1c4a1fd4159b75b10aab5f8238d0e31c664bc79 --- .../src/sandy-chrome/appinspect/LaunchEmulator.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/desktop/flipper-ui/src/sandy-chrome/appinspect/LaunchEmulator.tsx b/desktop/flipper-ui/src/sandy-chrome/appinspect/LaunchEmulator.tsx index 85235ab171d..5d5d3acd8a9 100644 --- a/desktop/flipper-ui/src/sandy-chrome/appinspect/LaunchEmulator.tsx +++ b/desktop/flipper-ui/src/sandy-chrome/appinspect/LaunchEmulator.tsx @@ -178,7 +178,9 @@ export const LaunchEmulatorDialog = withTrackingScope( items.push( , androidEmulators.length == 0 ? ( - <Typography.Paragraph style={{textAlign: 'center'}}> + <Typography.Paragraph + style={{textAlign: 'center'}} + key="android-message"> {androidMessage} </Typography.Paragraph> ) : null, @@ -253,7 +255,11 @@ export const LaunchEmulatorDialog = withTrackingScope( items.push( <Title key="ios-title" name="iOS Simulators" />, iosEmulators.length == 0 ? ( - <IOSPlaceholder kind={iOSMessage.type} message={iOSMessage.message} /> + <IOSPlaceholder + kind={iOSMessage.type} + message={iOSMessage.message} + key="ios-placeholder" + /> ) : null, ...chain(iosEmulators) .map((device) => ({ @@ -417,7 +423,7 @@ function VirtualDeviceRow({ removeFromFavorites: (id: string) => void; }) { return ( - <Layout.Horizontal gap="medium" center grow key={id}> + <Layout.Horizontal gap="medium" center grow> {children} {isFavorite ? ( <HeartFilled