Skip to content

Commit

Permalink
Minor change fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
gagik committed Jan 13, 2023
1 parent 3ed3adc commit fe0e949
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
10 changes: 0 additions & 10 deletions flipper-plugin-realm/src/components/RealmDataInspector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<DetailSidebar>
<Space direction="vertical" size="middle" style={flickerStyle}>
Expand Down
2 changes: 1 addition & 1 deletion flipper-plugin-realm/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export function plugin(client: PluginClient<Events, Methods>) {
return null;
}
const deserializedObject = deserializeRealmObject(serializedObject, actualSchema, downloadData);
return deserializedObject.realmObject;
return deserializedObject;
},
(reason) => {
pluginState.set({
Expand Down
4 changes: 2 additions & 2 deletions flipper-plugin-realm/src/pages/DataVisualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
RealmDataInspector,
} from '../components/RealmDataInspector';

type PropertyType = {
type DataVisualizerProps = {
objects: Array<DeserializedRealmObject>;
schemas: Array<SortedObjectSchema>;
currentSchema: SortedObjectSchema;
Expand All @@ -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<InspectionDataType>();
const [showSidebar, setShowSidebar] = useState(false);
Expand Down
2 changes: 2 additions & 0 deletions testApp/app/flipperTest/Schemas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});

0 comments on commit fe0e949

Please sign in to comment.