Skip to content

Commit d5893bb

Browse files
committed
Display video clip only if link exists
1 parent 7b51e0d commit d5893bb

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "igropolius",
33
"private": true,
4-
"version": "1.0.212",
4+
"version": "1.0.213",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src/components/core/endGameStatistics/components/StatisticsPlayerSection.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ function StatisticsPlayerSection({ data }: PlayerSectionProps) {
103103
}
104104
};
105105

106+
const videoLink = VideoLinks[data.username.toLowerCase()] ?? '';
107+
106108
return (
107109
<div className="space-y-[30px]">
108110
<div className="space-y-[15px]">
@@ -125,14 +127,18 @@ function StatisticsPlayerSection({ data }: PlayerSectionProps) {
125127

126128
<StatisticsRows data={data} keyToProps={keyToProps} />
127129

128-
<div className="space-y-[15px]">
129-
<div className="text-center font-roboto-wide-black-alt text-2xl leading-7">Лучший клип</div>
130-
<div className="flex justify-center">
131-
<div className="min-w-[500px] max-w-[500px] min-h-[281px] max-h-[281px]">
132-
<VideoPlayer videoLink={VideoLinks[data.username.toLowerCase()] ?? ''} />
130+
{videoLink && (
131+
<div className="space-y-[15px]">
132+
<div className="text-center font-roboto-wide-black-alt text-2xl leading-7">
133+
Забавный клип
134+
</div>
135+
<div className="flex justify-center">
136+
<div className="min-w-[500px] max-w-[500px] min-h-[281px] max-h-[281px]">
137+
<VideoPlayer videoLink={videoLink} />
138+
</div>
133139
</div>
134140
</div>
135-
</div>
141+
)}
136142

137143
{(data.best_rated_game || data.worst_rated_game) && (
138144
<div className="flex gap-[15px] justify-center">

0 commit comments

Comments
 (0)