Files
gridpilot.gg/apps/website/lib/hooks/useEffectiveDriverId.ts
2026-01-12 01:01:49 +01:00

10 lines
340 B
TypeScript

import { useCurrentDriver } from './driver/useCurrentDriver';
/**
* Hook to get the current driver ID from the user's session.
* Returns the driver ID string or undefined if not available.
*/
export function useEffectiveDriverId(): string | undefined {
const { data: currentDriver } = useCurrentDriver();
return currentDriver?.id;
}