website refactor
This commit is contained in:
10
apps/website/hooks/useEffectiveDriverId.ts
Normal file
10
apps/website/hooks/useEffectiveDriverId.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user