I've been working on https://github.com/NouanceLabs/payload-dashboard-analytics and trying to build out the logic for fetching analytics data via an API and then exposing it in the Payload admin panel via custom components. However I simply can't seem to be able to use any React hooks inside my custom components as I get a React error about invalid hook use. The component is here https://github.com/NouanceLabs/payload-dashboard-analytics/blob/main/src/components/Charts/ViewsChart.tsx
I cross referenced my implementation with the SEO plugin https://github.com/payloadcms/plugin-seo and the lexical plugin and for the life of me I can't seem to figure out where I'm going wrong.
I've attached a video showing how just one hook breaks the admin panel entirely.