()
| 40 | const ChartContext = React.createContext<ChartContextProps | null>(null); |
| 41 | |
| 42 | function useChart() { |
| 43 | const context = React.useContext(ChartContext); |
| 44 | |
| 45 | if (!context) { |
| 46 | throw new Error("useChart must be used within a <ChartContainer />"); |
| 47 | } |
| 48 | |
| 49 | return context; |
| 50 | } |
| 51 | |
| 52 | function ChartContainer({ |
| 53 | id, |
no outgoing calls
no test coverage detected