| import { db } from '../db/client'; | |
| // βββ useDatabase ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| // Simple wrapper that returns the shared Drizzle database instance. | |
| // Components can call `useDatabase()` to get a stable reference to `db`. | |
| export function useDatabase() { | |
| return { db }; | |
| } | |
| /** Alias for useDatabase β whichever name you prefer */ | |
| export const useDb = useDatabase; | |