Skip to content

Commit 2a669c6

Browse files
committed
Undo the JSON unparse hack now that we don't need to normalize date scalars
1 parent b069713 commit 2a669c6

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/components/EngagementDataGrid/useProcessEngagementUpdate.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,7 @@ export const useProcessEngagementUpdate = () => {
4747
optimisticResponse: {
4848
updateLanguageEngagement: {
4949
__typename: 'UpdateLanguageEngagementOutput',
50-
// This is an easy/cheap/hacky way to "unparse" the date scalars
51-
// before writing them to the cache.
52-
// Our read policies expect them to be ISO strings as we receive
53-
// them from the network this way.
54-
// Since our temporal objects have a toJSON, this works fine to revert that.
55-
engagement: JSON.parse(JSON.stringify(updated)),
50+
engagement: updated,
5651
},
5752
},
5853
});

0 commit comments

Comments
 (0)