@crtobiasdelsud/portal-ui 1.1.16 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +12 -0
- package/package.json +1 -1
- package/src/components/Mundial2026/Flags.module.scss +42 -0
- package/src/components/Mundial2026/Mundial2026.module.scss +229 -0
- package/src/components/Mundial2026/Mundial2026View.jsx +139 -0
- package/src/components/Mundial2026/MundialBoard.module.scss +439 -0
- package/src/components/Mundial2026/MundialBoardView.jsx +267 -0
- package/src/components/Mundial2026/flags.jsx +78 -0
- package/src/components/Mundial2026/mundialFormat.js +49 -0
- package/src/components/NotaDestacada/NotaDestacada.module.scss +85 -0
- package/src/components/NotaDestacada/NotaDestacadaView.jsx +75 -0
- package/src/components/UI/AspectImage/AspectImage.jsx +9 -1
- package/src/index.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.0] — 2026-06-18
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
Widget y screen **Mundial 2026**, copiando el diseño "Mundial 2026 · El Editor
|
|
8
|
+
Platense": verde petróleo `#034134`, papel cálido, serif Frank Ruhl Libre, borde
|
|
9
|
+
superior verde y banderas SVG geométricas. Componentes "vista pura" (cada app
|
|
10
|
+
pega al proxy `/api/portal/mundial` y les pasa la data resuelta).
|
|
11
|
+
|
|
12
|
+
- **`components/Mundial2026/Mundial2026View.jsx`** (nuevo): widget tira de
|
|
13
|
+
resultados (variante **V2**: celdas con aire + banderas grandes). Estado por
|
|
14
|
+
partido (EN VIVO con punto pulsante + minuto / horario "Hoy 21:00" / Finalizado),
|
|
15
|
+
dos equipos por celda (bandera + código + marcador, ganador/perdedor resaltado),
|
|
16
|
+
fila scrollable. Cabecera con barra verde, "Mundial 2026", fase y slot de
|
|
17
|
+
sponsor opcional. Prop `bare` para insertarlo dentro de la sección.
|
|
18
|
+
- **`components/Mundial2026/MundialBoardView.jsx`** (nuevo): sección completa para
|
|
19
|
+
`/mundial` (variante "Página"): la tira arriba, partido destacado (matchcard con
|
|
20
|
+
goleador y sede) y sidebar con **Posiciones**, **Goleadores** y **Próximos
|
|
21
|
+
partidos**.
|
|
22
|
+
- **`components/Mundial2026/flags.jsx`** (nuevo): banderas SVG geométricas + nombres
|
|
23
|
+
por código de 3 letras (TLA) y componente `<Flag size="sm|md|lg">`.
|
|
24
|
+
- **`components/Mundial2026/mundialFormat.js`** (nuevo): etiquetas de horario es-AR
|
|
25
|
+
("Hoy 21:00" / "Mañana 16:00").
|
|
26
|
+
- La paleta del diseño va scopeada al contenedor (no se filtra al resto del portal).
|
|
27
|
+
- Exportados desde el barrel: `Mundial2026View`, `MundialBoardView`.
|
|
28
|
+
|
|
3
29
|
## [Unreleased] — 2026-06-04
|
|
4
30
|
|
|
5
31
|
### Added
|
package/README.md
CHANGED
|
@@ -58,6 +58,18 @@ const nextConfig = {
|
|
|
58
58
|
|
|
59
59
|
## Setup mínimo
|
|
60
60
|
|
|
61
|
+
### Convención de identidad editorial
|
|
62
|
+
|
|
63
|
+
Cuando una app consumidora inyecta `siteConfig` con `slots.header.settings`, el
|
|
64
|
+
paquete distingue:
|
|
65
|
+
|
|
66
|
+
- `siteName` → branding visual del medio
|
|
67
|
+
- `publisherName` → firma organizacional para bylines / author display
|
|
68
|
+
|
|
69
|
+
Para autoría organizacional, `Portal-UI` resuelve `publisherName || siteName`.
|
|
70
|
+
Esto evita que un cambio de branding visual cambie automáticamente la firma
|
|
71
|
+
editorial de notas o previews si el tenant define `publisherName`.
|
|
72
|
+
|
|
61
73
|
### Next (App Router)
|
|
62
74
|
|
|
63
75
|
```jsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crtobiasdelsud/portal-ui",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Componentes compartidos entre el portal (Next) y el CMS (Vite) — widgets, views, providers para adapters y article pool.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Bandera geométrica simple (3:2), reutilizable por widget y board.
|
|
2
|
+
.fl {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
width: 23px;
|
|
5
|
+
height: 15.5px;
|
|
6
|
+
border-radius: 2.5px;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
9
|
+
flex: none;
|
|
10
|
+
background: #eee;
|
|
11
|
+
|
|
12
|
+
svg {
|
|
13
|
+
display: block;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Bandera por imagen (logo/escudo del proveedor — Promiedos sirve 60x60).
|
|
20
|
+
// Caja cuadrada (aspect 1:1, ancho derivado del alto) + `contain` para NO
|
|
21
|
+
// recortar la imagen. Sin fondo ni borde, que la imagen ya trae el suyo.
|
|
22
|
+
.img {
|
|
23
|
+
width: auto;
|
|
24
|
+
aspect-ratio: 1 / 1;
|
|
25
|
+
object-fit: contain;
|
|
26
|
+
object-position: center;
|
|
27
|
+
background: transparent;
|
|
28
|
+
box-shadow: none;
|
|
29
|
+
border-radius: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.md {
|
|
33
|
+
width: 28px;
|
|
34
|
+
height: 19px;
|
|
35
|
+
border-radius: 3px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.lg {
|
|
39
|
+
width: 34px;
|
|
40
|
+
height: 23px;
|
|
41
|
+
border-radius: 3px;
|
|
42
|
+
}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
@use "../../styles/index.scss" as *;
|
|
2
|
+
|
|
3
|
+
// Paleta del diseño "Mundial 2026 · El Editor" (verde petróleo, papel cálido),
|
|
4
|
+
// scopeada al contenedor para no filtrar al resto del portal.
|
|
5
|
+
.mwid {
|
|
6
|
+
--green: #034134;
|
|
7
|
+
--green-2: #0a5d49;
|
|
8
|
+
--green-tint: #eef3f1;
|
|
9
|
+
--live: #b3261e;
|
|
10
|
+
--ink: #141414;
|
|
11
|
+
--ink-2: #3d3d3d;
|
|
12
|
+
--muted: #6f6f6f;
|
|
13
|
+
--faint: #9a968c;
|
|
14
|
+
--line: #e3e1da;
|
|
15
|
+
--line-2: #efece4;
|
|
16
|
+
--paper: #ffffff;
|
|
17
|
+
|
|
18
|
+
background: var(--paper);
|
|
19
|
+
border: 1px solid var(--line);
|
|
20
|
+
border-top: 3px solid var(--green);
|
|
21
|
+
color: var(--ink);
|
|
22
|
+
font-family: var(--font-inter, 'Inter', system-ui, sans-serif);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.bare {
|
|
26
|
+
border: 0;
|
|
27
|
+
border-top: 0;
|
|
28
|
+
|
|
29
|
+
.head { background: #faf9f6; }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Widget clickeable → /mundial. El <a>/<Link> envuelve toda la tarjeta.
|
|
33
|
+
.link {
|
|
34
|
+
display: block;
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
color: inherit;
|
|
37
|
+
transition: box-shadow 0.15s ease, transform 0.15s ease;
|
|
38
|
+
|
|
39
|
+
&:hover {
|
|
40
|
+
box-shadow: 0 6px 22px -14px rgba(3, 65, 52, 0.55);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:hover .go {
|
|
44
|
+
color: var(--green-2);
|
|
45
|
+
gap: 8px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Hint "Ver Mundial ›" a la derecha de la cabecera (header claro → verde).
|
|
50
|
+
.go {
|
|
51
|
+
margin-left: auto;
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: 5px;
|
|
55
|
+
flex: none;
|
|
56
|
+
font-size: 11px;
|
|
57
|
+
font-weight: 700;
|
|
58
|
+
letter-spacing: 0.04em;
|
|
59
|
+
text-transform: uppercase;
|
|
60
|
+
color: var(--green);
|
|
61
|
+
transition: gap 0.15s ease, color 0.15s ease;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// ── Cabecera ───────────────────────────────────────────────
|
|
65
|
+
.head {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
gap: 11px;
|
|
69
|
+
padding: 13px 18px;
|
|
70
|
+
border-bottom: 1px solid var(--line);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.bar {
|
|
74
|
+
width: 4px;
|
|
75
|
+
height: 19px;
|
|
76
|
+
background: var(--green);
|
|
77
|
+
flex: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.title {
|
|
81
|
+
font-family: var(--font-titulo, 'Frank Ruhl Libre', Georgia, serif);
|
|
82
|
+
font-weight: 800;
|
|
83
|
+
font-size: 17px;
|
|
84
|
+
margin: 0;
|
|
85
|
+
letter-spacing: 0.01em;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.ph {
|
|
89
|
+
color: var(--faint);
|
|
90
|
+
font-size: 12px;
|
|
91
|
+
font-weight: 500;
|
|
92
|
+
padding-left: 10px;
|
|
93
|
+
border-left: 1px solid var(--line);
|
|
94
|
+
margin-left: 2px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.spon {
|
|
98
|
+
margin-left: auto;
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
gap: 9px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.sponLbl {
|
|
105
|
+
font-size: 10px;
|
|
106
|
+
letter-spacing: 0.14em;
|
|
107
|
+
text-transform: uppercase;
|
|
108
|
+
color: var(--faint);
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.sponSlot {
|
|
113
|
+
min-height: 22px;
|
|
114
|
+
padding: 4px 10px;
|
|
115
|
+
border: 1px dashed var(--line);
|
|
116
|
+
border-radius: 3px;
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: center;
|
|
120
|
+
font-size: 9px;
|
|
121
|
+
color: var(--faint);
|
|
122
|
+
letter-spacing: 0.08em;
|
|
123
|
+
text-transform: uppercase;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// ── Fila de celdas ─────────────────────────────────────────
|
|
127
|
+
.row {
|
|
128
|
+
display: flex;
|
|
129
|
+
overflow-x: auto;
|
|
130
|
+
scrollbar-width: thin;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.cell {
|
|
134
|
+
flex: 1 0 0;
|
|
135
|
+
min-width: 184px;
|
|
136
|
+
padding: 13px 18px 14px;
|
|
137
|
+
border-left: 1px solid var(--line-2);
|
|
138
|
+
|
|
139
|
+
&:first-child { border-left: 0; }
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// ── Estado del partido ─────────────────────────────────────
|
|
143
|
+
.st {
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
justify-content: center;
|
|
147
|
+
gap: 7px;
|
|
148
|
+
height: 18px;
|
|
149
|
+
margin-bottom: 11px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.stText {
|
|
153
|
+
font-size: 10.5px;
|
|
154
|
+
letter-spacing: 0.1em;
|
|
155
|
+
text-transform: uppercase;
|
|
156
|
+
font-weight: 700;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.stLive .stText { color: var(--live); }
|
|
160
|
+
.stTime .stText { color: var(--green); }
|
|
161
|
+
.stFinal .stText { color: var(--faint); }
|
|
162
|
+
|
|
163
|
+
.min {
|
|
164
|
+
font-size: 10.5px;
|
|
165
|
+
font-weight: 700;
|
|
166
|
+
color: var(--live);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.liveDot {
|
|
170
|
+
width: 7px;
|
|
171
|
+
height: 7px;
|
|
172
|
+
border-radius: 50%;
|
|
173
|
+
background: var(--live);
|
|
174
|
+
animation: mundialPulse 1.4s ease-in-out infinite;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@keyframes mundialPulse {
|
|
178
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
179
|
+
50% { opacity: 0.35; transform: scale(0.82); }
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@media (prefers-reduced-motion: reduce) {
|
|
183
|
+
.liveDot { animation: none; }
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ── Equipo ─────────────────────────────────────────────────
|
|
187
|
+
.team {
|
|
188
|
+
display: grid;
|
|
189
|
+
grid-template-columns: auto 1fr auto;
|
|
190
|
+
align-items: center;
|
|
191
|
+
gap: 9px;
|
|
192
|
+
padding: 3px 0;
|
|
193
|
+
|
|
194
|
+
& + & { margin-top: 2px; }
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.code {
|
|
198
|
+
font-size: 13.5px;
|
|
199
|
+
font-weight: 600;
|
|
200
|
+
color: var(--ink-2);
|
|
201
|
+
letter-spacing: 0.02em;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.sc {
|
|
205
|
+
font-family: var(--font-titulo, 'Frank Ruhl Libre', Georgia, serif);
|
|
206
|
+
font-weight: 800;
|
|
207
|
+
font-size: 18px;
|
|
208
|
+
color: var(--ink);
|
|
209
|
+
min-width: 14px;
|
|
210
|
+
text-align: right;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.win .code { color: var(--ink); font-weight: 700; }
|
|
214
|
+
.lose .code { color: var(--faint); }
|
|
215
|
+
.lose .sc { color: var(--faint); font-weight: 700; }
|
|
216
|
+
|
|
217
|
+
.vs {
|
|
218
|
+
font-size: 11px;
|
|
219
|
+
color: var(--faint);
|
|
220
|
+
font-weight: 600;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// ── V2 · más aire + banderas grandes ───────────────────────
|
|
224
|
+
.v2 {
|
|
225
|
+
.cell { padding: 16px 20px 18px; min-width: 200px; }
|
|
226
|
+
.team { padding: 5px 0; gap: 11px; }
|
|
227
|
+
.code { font-size: 14.5px; }
|
|
228
|
+
.sc { font-size: 20px; }
|
|
229
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import style from './Mundial2026.module.scss'
|
|
4
|
+
import { Flag, teamName } from './flags.jsx'
|
|
5
|
+
import { kickoffLabel } from './mundialFormat.js'
|
|
6
|
+
import { useOptionalAdapters } from '../../adapters/AdaptersContext.jsx'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Widget "Mundial 2026" — tira de resultados (variante V2 del diseño El Editor):
|
|
10
|
+
* verde petróleo, serif Frank Ruhl Libre, borde superior verde, banderas grandes
|
|
11
|
+
* y celdas respiradas. Vista pura: recibe `data` resuelta (la app pega al proxy
|
|
12
|
+
* `/api/portal/mundial`). Sin partidos, no renderiza.
|
|
13
|
+
*
|
|
14
|
+
* - Ordena EN VIVO primero (los que se están jugando), luego próximos y por
|
|
15
|
+
* último finalizados → "lo que se juega ahora" aparece primero.
|
|
16
|
+
* - Todo el widget es un link a la sección `/mundial` (salvo `bare`, que ya va
|
|
17
|
+
* dentro de esa página). `settings.href` permite cambiar el destino.
|
|
18
|
+
*
|
|
19
|
+
* Props:
|
|
20
|
+
* - data, settings: { limit, sponsorLabel, href }
|
|
21
|
+
* - bare: sin chrome de tarjeta ni link (para insertar dentro de /mundial)
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
const STATUS_ORDER = { live: 0, scheduled: 1, finished: 2 }
|
|
25
|
+
|
|
26
|
+
function sortMatches(matches) {
|
|
27
|
+
return [...matches].sort((a, b) => {
|
|
28
|
+
const d = (STATUS_ORDER[a.status] ?? 9) - (STATUS_ORDER[b.status] ?? 9)
|
|
29
|
+
if (d) return d
|
|
30
|
+
const ta = a.datetime ? new Date(a.datetime).getTime() : 0
|
|
31
|
+
const tb = b.datetime ? new Date(b.datetime).getTime() : 0
|
|
32
|
+
return a.status === 'finished' ? tb - ta : ta - tb // próximos: más cercano primero; finalizados: más reciente
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default function Mundial2026View({ data, settings = {}, bare = false }) {
|
|
37
|
+
const adapters = useOptionalAdapters()
|
|
38
|
+
const Link = adapters?.Link
|
|
39
|
+
|
|
40
|
+
const matches = Array.isArray(data?.matches) ? data.matches : []
|
|
41
|
+
if (!matches.length) return null
|
|
42
|
+
|
|
43
|
+
const sorted = sortMatches(matches)
|
|
44
|
+
const liveCount = sorted.filter((m) => m.status === 'live').length
|
|
45
|
+
// Default: mostrar al menos los partidos en vivo (mín. 2 celdas para acompañar).
|
|
46
|
+
const limit = Number.isFinite(settings.limit) ? settings.limit : Math.max(liveCount, 2)
|
|
47
|
+
const visibles = sorted.slice(0, Math.max(1, limit))
|
|
48
|
+
|
|
49
|
+
const phase = data?.phase || 'Fase de grupos'
|
|
50
|
+
const sponsorLabel = settings.sponsorLabel
|
|
51
|
+
const href = settings.href || '/mundial'
|
|
52
|
+
|
|
53
|
+
const inner = (
|
|
54
|
+
<section className={`${style.mwid} ${style.v2} ${bare ? style.bare : ''}`.trim()} aria-label="Mundial 2026">
|
|
55
|
+
<div className={style.head}>
|
|
56
|
+
<span className={style.bar} />
|
|
57
|
+
<h4 className={style.title}>{data?.tournament || 'Mundial 2026'}</h4>
|
|
58
|
+
<span className={style.ph}>{phase}</span>
|
|
59
|
+
{sponsorLabel && (
|
|
60
|
+
<span className={style.spon}>
|
|
61
|
+
<span className={style.sponLbl}>Ofrecido por</span>
|
|
62
|
+
<span className={style.sponSlot}>{sponsorLabel}</span>
|
|
63
|
+
</span>
|
|
64
|
+
)}
|
|
65
|
+
{!bare && <span className={style.go} aria-hidden="true">Ver Mundial ›</span>}
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div className={style.row}>
|
|
69
|
+
{visibles.map((m, i) => (
|
|
70
|
+
<Cell key={m.id ?? i} match={m} />
|
|
71
|
+
))}
|
|
72
|
+
</div>
|
|
73
|
+
</section>
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
if (bare) return inner
|
|
77
|
+
|
|
78
|
+
return Link
|
|
79
|
+
? <Link href={href} className={style.link} aria-label="Ir a la sección Mundial 2026">{inner}</Link>
|
|
80
|
+
: <a href={href} className={style.link} aria-label="Ir a la sección Mundial 2026">{inner}</a>
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function Cell({ match }) {
|
|
84
|
+
const upcoming = match.status === 'scheduled'
|
|
85
|
+
return (
|
|
86
|
+
<div className={style.cell}>
|
|
87
|
+
<Status match={match} />
|
|
88
|
+
<Team side={match.home} other={match.away} upcoming={upcoming} />
|
|
89
|
+
<Team side={match.away} other={match.home} upcoming={upcoming} />
|
|
90
|
+
</div>
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function Team({ side = {}, other = {}, upcoming }) {
|
|
95
|
+
const sc = side.score
|
|
96
|
+
const os = other.score
|
|
97
|
+
let outcome = ''
|
|
98
|
+
if (!upcoming && typeof sc === 'number' && typeof os === 'number') {
|
|
99
|
+
if (sc > os) outcome = style.win
|
|
100
|
+
else if (sc < os) outcome = style.lose
|
|
101
|
+
}
|
|
102
|
+
return (
|
|
103
|
+
<div className={`${style.team} ${outcome}`.trim()}>
|
|
104
|
+
<Flag code={side.code} flag={side.flag} size="md" />
|
|
105
|
+
<span className={style.code}>{side.code || teamName(side.code, side.name).slice(0, 3).toUpperCase()}</span>
|
|
106
|
+
{upcoming ? <span className={style.vs} /> : <span className={style.sc}>{sc}</span>}
|
|
107
|
+
</div>
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function Status({ match }) {
|
|
112
|
+
const { status, minute, datetime } = match
|
|
113
|
+
if (status === 'live') {
|
|
114
|
+
return (
|
|
115
|
+
<div className={`${style.st} ${style.stLive}`}>
|
|
116
|
+
<span className={style.liveDot} />
|
|
117
|
+
<span className={style.stText}>En vivo</span>
|
|
118
|
+
{minute != null && <span className={style.min}>{formatMinute(minute)}</span>}
|
|
119
|
+
</div>
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
if (status === 'finished') {
|
|
123
|
+
return (
|
|
124
|
+
<div className={`${style.st} ${style.stFinal}`}>
|
|
125
|
+
<span className={style.stText}>Finalizado</span>
|
|
126
|
+
</div>
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
return (
|
|
130
|
+
<div className={`${style.st} ${style.stTime}`}>
|
|
131
|
+
<span className={style.stText}>{kickoffLabel(datetime)}</span>
|
|
132
|
+
</div>
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function formatMinute(minute) {
|
|
137
|
+
if (typeof minute === 'number') return `${minute}'`
|
|
138
|
+
return String(minute)
|
|
139
|
+
}
|