@vixoniccom/footbal-score 1.0.2-beta.0 → 1.0.2-beta.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 CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.0.2-beta.1](https://gitlab.com/mandomedio/vixonic/football-score/compare/v1.0.2-beta.0...v1.0.2-beta.1) (2022-12-05)
6
+
5
7
  ### [1.0.2-beta.0](https://gitlab.com/mandomedio/vixonic/football-score/compare/v1.0.1...v1.0.2-beta.0) (2022-11-29)
6
8
 
7
9
  ### [1.0.1](https://gitlab.com/mandomedio/vixonic/football-score/compare/v1.0.1-beta.20...v1.0.1) (2022-11-24)
package/build.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vixoniccom/footbal-score",
3
3
  "alias": "Resultados Deportivos",
4
- "version": "1.0.2-beta.0",
4
+ "version": "1.0.2-beta.1",
5
5
  "description": "Muestra resultados en vivo de fútbol.",
6
6
  "main": "main.js",
7
7
  "author": "",
@@ -2,20 +2,28 @@ import React, { useContext } from 'react'
2
2
  import { ConfigureContext } from '../../contex/configureContext/ConfigureContext'
3
3
  import { FormattedText } from '../FormattedText'
4
4
 
5
- export const Results = (goals: any) => {
5
+ export const Results = ({ goals, score }: any) => {
6
6
 
7
7
  const { configureState } = useContext(ConfigureContext)
8
8
  const { parameters } = configureState
9
-
9
+
10
10
 
11
11
  return (
12
12
  <div style={{
13
13
  display: 'flex',
14
14
  justifyContent: 'center',
15
15
  }}>
16
- <FormattedText text={goals.goals.home ? goals.goals.home : 0} format={parameters.goalsFormat} />
16
+ {
17
+ score.penalty.home &&
18
+ <FormattedText text={`(${score.penalty.home})`} format={parameters.goalsFormat} />
19
+ }
20
+ <FormattedText text={goals.home ? goals.home : 0} format={parameters.goalsFormat} />
17
21
  <FormattedText text={"-"} format={parameters.goalsFormat} />
18
- <FormattedText text={goals.goals.away ? goals.goals.away : 0} format={parameters.goalsFormat} />
22
+ <FormattedText text={goals.away ? goals.away : 0} format={parameters.goalsFormat} />
23
+ {
24
+ score.penalty.away &&
25
+ <FormattedText text={`(${score.penalty.away}) `} format={parameters.goalsFormat} />
26
+ }
19
27
  </div>
20
28
  )
21
29
  }
@@ -9,7 +9,7 @@ import { Results } from './Results';
9
9
 
10
10
  export const Row = (item: any) => {
11
11
 
12
- const { fixture, teams, goals } = item.item;
12
+ const { fixture, teams, goals, score } = item.item;
13
13
  const { configureState } = useContext(ConfigureContext)
14
14
  const { parameters } = configureState
15
15
  const [homeTeam, setHomeTeam] = useState(false);
@@ -100,8 +100,6 @@ export const Row = (item: any) => {
100
100
 
101
101
  </div>
102
102
 
103
-
104
-
105
103
  {
106
104
  descriptionEnabled &&
107
105
  <div style={{
@@ -127,7 +125,7 @@ export const Row = (item: any) => {
127
125
  }
128
126
  </div>
129
127
 
130
- <Results goals={goals} />
128
+ <Results goals={goals} score={score} />
131
129
 
132
130
  <div
133
131
  style={{
@@ -17,6 +17,7 @@ export const getFixture = async () => {
17
17
  };
18
18
  try {
19
19
  const response = await axios.request(options)
20
+ console.log("🚀 ~ file: getFixture.ts:20 ~ getFixture ~ response", response.data.response)
20
21
  return response.data.response
21
22
  } catch (error) {
22
23
  console.error(error);