()
| 25 | const ChartContext = React.createContext<ChartContextProps | null>(null) |
| 26 | |
| 27 | function useChart() { |
| 28 | const context = React.useContext(ChartContext) |
| 29 | |
| 30 | if (!context) { |
| 31 | throw new Error("useChart must be used within a <ChartContainer />") |
| 32 | } |
| 33 | |
| 34 | return context |
| 35 | } |
| 36 | |
| 37 | function ChartContainer({ |
| 38 | id, |
no outgoing calls
no test coverage detected