()
| 2 | import { DatabaseContext } from '../contexts/DatabaseContext'; |
| 3 | |
| 4 | export const useDatabase = () => { |
| 5 | const context = useContext(DatabaseContext); |
| 6 | if (context === undefined) { |
| 7 | throw new Error('useDatabase must be used within a DatabaseProvider'); |
| 8 | } |
| 9 | return context; |
| 10 | }; |
no outgoing calls
no test coverage detected