From fe0e94953d1e12fded516b84c6ff3e49a152ba50 Mon Sep 17 00:00:00 2001 From: gagik Date: Fri, 13 Jan 2023 16:59:36 +0100 Subject: [PATCH] Minor change fix. --- .../src/components/RealmDataInspector.tsx | 10 ---------- flipper-plugin-realm/src/index.tsx | 2 +- flipper-plugin-realm/src/pages/DataVisualizer.tsx | 4 ++-- testApp/app/flipperTest/Schemas.tsx | 2 ++ 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/flipper-plugin-realm/src/components/RealmDataInspector.tsx b/flipper-plugin-realm/src/components/RealmDataInspector.tsx index cbad18d..e0415e9 100644 --- a/flipper-plugin-realm/src/components/RealmDataInspector.tsx +++ b/flipper-plugin-realm/src/components/RealmDataInspector.tsx @@ -90,16 +90,6 @@ export const RealmDataInspector = ({ backgroundColor: flickering ? '#6932c9' : 'transparent', }; - // // TODO: not sure if this is best way to go about this. - // let formattedObjects: any = {}; - // Object.entries(inspectionData.data).forEach(([field, fieldValue]) => { - // if (typeof fieldValue === "object" && fieldValue.objectKey && fieldValue.objectType) { - // formattedObjects[field] = `[${fieldValue.objectType}]._objectKey=${fieldValue.objectKey}` - // } else { - // formattedObjects[field] = fieldValue; - // } - // }) - return ( diff --git a/flipper-plugin-realm/src/index.tsx b/flipper-plugin-realm/src/index.tsx index 859784c..d3bf63a 100644 --- a/flipper-plugin-realm/src/index.tsx +++ b/flipper-plugin-realm/src/index.tsx @@ -222,7 +222,7 @@ export function plugin(client: PluginClient) { return null; } const deserializedObject = deserializeRealmObject(serializedObject, actualSchema, downloadData); - return deserializedObject.realmObject; + return deserializedObject; }, (reason) => { pluginState.set({ diff --git a/flipper-plugin-realm/src/pages/DataVisualizer.tsx b/flipper-plugin-realm/src/pages/DataVisualizer.tsx index 09dcfe6..eb81d16 100644 --- a/flipper-plugin-realm/src/pages/DataVisualizer.tsx +++ b/flipper-plugin-realm/src/pages/DataVisualizer.tsx @@ -14,7 +14,7 @@ import { RealmDataInspector, } from '../components/RealmDataInspector'; -type PropertyType = { +type DataVisualizerProps = { objects: Array; schemas: Array; currentSchema: SortedObjectSchema; @@ -39,7 +39,7 @@ const DataVisualizer = ({ enableSort, clickAction, fetchMore, -}: PropertyType) => { +}: DataVisualizerProps) => { /** Hooks to manage the state of the DataInspector and open/close the sidebar. */ const [inspectionData, setInspectionData] = useState(); const [showSidebar, setShowSidebar] = useState(false); diff --git a/testApp/app/flipperTest/Schemas.tsx b/testApp/app/flipperTest/Schemas.tsx index 8edd04e..4200914 100644 --- a/testApp/app/flipperTest/Schemas.tsx +++ b/testApp/app/flipperTest/Schemas.tsx @@ -242,9 +242,11 @@ export const FlipperTestRealmContext = createRealmContext({ EmbeddedSchema, ], path: 'flipper_test', + deleteRealmIfMigrationNeeded: true, }); export const FlipperTestSecondRealmContext = createRealmContext({ schema: [Parcel, ParcelService, Delivery, MailCarrier], path: 'flipper_test_2', + deleteRealmIfMigrationNeeded: true, });