Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port <ResourceModal> (part of <ListResources>) to App Router [#1066]
* move styling from styled components to CSS module * refactor <ResourceModal> to `useContext` and `useCallback` to build `dismissModal()` function, rather than passing it in — this was necessary because all props of React Client Components need to be serializable (i.e., not functions), and <ResourceModal> needs to "use client" because it depends on `useState` and `useEffect` * refactor the `_draw` function out into a distinct file (`modal_draw.js`) to reflect the lack of typing in that code (I briefly explored converting that file to Typescript and concluded the juice was not worth the squeeze) * note that this also means we don't need to add @types/d3 to devDependencies
- Loading branch information