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