Files
gridpilot.gg/apps/website/lib/view-data/ProfileViewData.ts
Marc Mintel 18133aef4c
Some checks failed
Contract Testing / contract-tests (pull_request) Failing after 5m42s
Contract Testing / contract-snapshot (pull_request) Has been skipped
view data fixes
2026-01-22 23:40:38 +01:00

67 lines
1.5 KiB
TypeScript

import { ViewData } from "../contracts/view-data/ViewData";
export interface ProfileViewData extends ViewData {
driver: {
id: string;
name: string;
countryCode: string;
countryFlag: string;
avatarUrl: string;
bio: string | null;
iracingId: string | null;
joinedAtLabel: string;
};
stats: {
ratingLabel: string;
globalRankLabel: string;
totalRacesLabel: string;
winsLabel: string;
podiumsLabel: string;
dnfsLabel: string;
bestFinishLabel: string;
worstFinishLabel: string;
avgFinishLabel: string;
consistencyLabel: string;
percentileLabel: string;
} | null;
teamMemberships: Array<{
teamId: string;
teamName: string;
teamTag: string | null;
roleLabel: string;
joinedAtLabel: string;
href: string;
}>;
extendedProfile: {
timezone: string;
racingStyle: string;
favoriteTrack: string;
favoriteCar: string;
availableHours: string;
lookingForTeamLabel: string;
openToRequestsLabel: string;
socialHandles: Array<{
platformLabel: string;
handle: string;
url: string;
}>;
achievements: Array<{
id: string;
title: string;
description: string;
earnedAtLabel: string;
icon: 'trophy' | 'medal' | 'star' | 'crown' | 'target' | 'zap';
rarityLabel: string;
}>;
friends: Array<{
id: string;
name: string;
countryFlag: string;
avatarUrl: string;
href: string;
}>;
friendsCountLabel: string;
} | null;
}