mobileapp / src /hooks /useDatabase.ts
Antaram Dev Bot
feat: complete ANTARAM.ORG ride-sharing app frontend
5c876be
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;