We currently format the API response to a specific data structure before passing it to the DatasetActionButton component for the useDatasetAction hook. We'll instead create a new helper method in the useDatasetAction hook which formats the API response, and then use that to pass the formatted data to the DatasetActionButton component.
We should define the methods to format the API response (for a single experiment and an array of experiments) in the useDatasetActionhook and use it to pass the prop to the DatasetActionButton component.
Solution or next step
Implement the above and adjust the codebase accordingly.
Context
Reference: https://github.com/AlexsLemonade/refinebio-web/pull/192#discussion_r1350710760
We currently format the API response to a specific data structure before passing it to the
DatasetActionButton
component for theuseDatasetAction
hook. We'll instead create a new helper method in theuseDatasetAction
hook which formats the API response, and then use that to pass the formatted data to theDatasetActionButton
component.The data structure is as follows:
Problem or idea
We should define the methods to format the API response (for a single experiment and an array of experiments) in the
useDatasetAction
hook and use it to pass the prop to theDatasetActionButton
component.Solution or next step
Implement the above and adjust the codebase accordingly.