Hooks
SWR-based hooks for fetching and mutating data across the CDT platform. Hooks are organized by resource — each directory corresponds to a domain entity (e.g. buildings/, sites/, sensors/) and contains hooks for reading and writing that resource.
All hooks follow the same pattern: a useResource hook for fetching and a useCreateResource or similar for mutations.
If you're new to the codebase, start with Buildings — it's the most complete and covers patterns used across all other hooks.
In this section
- useBuilding hooks
- useComment hooks
- useFile hooks
- useInfrastructure hooks
- useOpenDataPortals hooks
- useOrganization hooks
- ApiAdapter Interface
- useSensorType hooks
- useSensor hooks
- useSite hooks
- useIsMobile hook
- useUser hooks