Files
gridpilot.gg/apps/website/hooks/useEffectiveDriverId.ts
2026-01-14 23:46:04 +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;
}