resolve todos in core
This commit is contained in:
@@ -11,6 +11,8 @@ import { useEffectiveDriverId } from '@/hooks/useEffectiveDriverId';
|
||||
import type { DriverDTO } from '@core/racing/application/dto/DriverDTO';
|
||||
import { EntityMappers } from '@core/racing/application/mappers/EntityMappers';
|
||||
|
||||
// TODO EntityMapper is legacy. Must use ´useServices` hook.
|
||||
|
||||
// Hook to detect sponsor mode
|
||||
function useSponsorMode(): boolean {
|
||||
const [isSponsor, setIsSponsor] = useState(false);
|
||||
@@ -81,20 +83,12 @@ function SponsorSummaryPill({
|
||||
}
|
||||
|
||||
export default function UserPill() {
|
||||
const { session, login } = useAuth();
|
||||
const { session } = useAuth();
|
||||
const [driver, setDriver] = useState<DriverDTO | null>(null);
|
||||
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
||||
const isSponsorMode = useSponsorMode();
|
||||
const shouldReduceMotion = useReducedMotion();
|
||||
|
||||
const user = session?.user as
|
||||
| {
|
||||
id: string;
|
||||
displayName?: string;
|
||||
primaryDriverId?: string | null;
|
||||
avatarUrl?: string | null;
|
||||
}
|
||||
| undefined;
|
||||
|
||||
const primaryDriverId = useEffectiveDriverId();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user