Skip to content

Commit

Permalink
Add player names
Browse files Browse the repository at this point in the history
  • Loading branch information
maximvl committed Oct 3, 2024
1 parent 2b5a8d7 commit 9e37109
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/players/components/PlayerSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function PlayerSection({ player }: Props) {
<Box display="flex" justifyContent="center">
<Box textAlign={'left'}>
<Typography fontSize={'48px'} fontWeight={700} lineHeight={1}>
Имя {player.name}
{player.first_name || ''} {player.name}
</Typography>
<Box
height={'300px'}
Expand Down
8 changes: 8 additions & 0 deletions src/utils/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const playerLasqa: Player = {
is_online: false,
url_handle: 'lasqa',
stream_last_category: 'Gothic',
first_name: 'Богдан',
last_name: '',
}

const playerSegall: Player = {
Expand All @@ -25,6 +27,8 @@ const playerSegall: Player = {
is_online: false,
url_handle: 'segall',
stream_last_category: 'Just Chatting',
first_name: 'Александр',
last_name: '',
}

const playerRoadhouse: Player = {
Expand All @@ -38,6 +42,8 @@ const playerRoadhouse: Player = {
is_online: true,
url_handle: 'roadhouse',
stream_last_category: 'Witcher',
first_name: '',
last_name: '',
}

const playerPraden: Player = {
Expand All @@ -51,6 +57,8 @@ const playerPraden: Player = {
is_online: true,
url_handle: 'praden',
stream_last_category: 'Witcher',
first_name: '',
last_name: '',
}

export const playersMock = [
Expand Down
2 changes: 2 additions & 0 deletions src/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export type Player = {
url_handle: string
map_position: number
stream_last_category: string
first_name: string
last_name: string
}

export type PlayerStats = {
Expand Down

0 comments on commit 9e37109

Please sign in to comment.