twenty
twenty copied to clipboard
Clean useOpenCreateActivityDrawerV2 with common read/write logic
useOpenCreateActivityDrawerV2 uses client.writeQuery to inject data before the read queries are mounted.
The problem is that write and read are in separated files and there's nothing that keeps one's filtering from drifting away from the other.
One approach would be to create a common hook that returns the filtering for those two hooks, or create a hook that return the read query hook and the write query hook with the same filtering, so they always go in pairs.