Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const source: IHydrographDatasource[] = | ||
| { | ||
| id: 2, | ||
| name: 'Transducer', | ||
| style: 'line', | ||
| data: | ||
| allTransducerRows.map((obs) => ({ | ||
| phenomenonTime: new Date(obs.observation.observation_datetime), | ||
| result: Number(obs.observation.value), | ||
| })) || [], | ||
| } | ||
| console.log('source', source) | ||
| setHydrographDatasource((prevState)=> [...prevState, source]) |
There was a problem hiding this comment.
Assign correct type when creating transducer datasource
The transducer useEffect declares const source: IHydrographDatasource[] = { … } but initializes it with a single object rather than an array. Because IHydrographDatasource[] expects an array, TypeScript will complain that the object literal is missing array members (length, push, etc.) and the file will fail to compile. This needs to be either typed as IHydrographDatasource or wrapped in an array literal before appending it to state.
Useful? React with 👍 / 👎.
…ed effect in well-show component
@chasetmartin @TylerAdamMartinez
This is not fully baked but it might be a good start when you want to add the transducer data to the hydrograph
Why
This PR addresses the following problem / context:
How
Implementation summary - the following was changed / added / removed:
Notes
Any special considerations, workarounds, or follow-up work to note?