@vixoniccom/footbal-score 1.0.3-beta.0 → 1.0.3-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.3-beta.1](https://bitbucket.org/vixonic_dev/football-score/compare/v1.0.3-beta.0...v1.0.3-beta.1) (2024-04-30)
6
+
5
7
  ### [1.0.3-beta.0](https://bitbucket.org/vixonic_dev/football-score/compare/v1.0.2...v1.0.3-beta.0) (2024-04-30)
6
8
 
7
9
  ### [1.0.2](https://gitlab.com/mandomedio/vixonic/football-score/compare/v1.0.2-beta.4...v1.0.2) (2022-12-07)
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.3-beta.0",
4
+ "version": "1.0.3-beta.1",
5
5
  "description": "Muestra resultados en vivo de fútbol.",
6
6
  "main": "main.js",
7
7
  "author": "",
package/src/App.tsx CHANGED
@@ -17,6 +17,8 @@ export const App = ({ data, start }: Props) => {
17
17
 
18
18
  const [dataFixture, setDataFixture] = useState([]);
19
19
  const [league, setLeague] = useState('');
20
+ const today = moment().format('YYYY-MM-DD')
21
+ const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone
20
22
 
21
23
  const { configureState, addConfiguration } = useContext(ConfigureContext)
22
24
 
@@ -56,7 +58,7 @@ export const App = ({ data, start }: Props) => {
56
58
  addConfiguration(data)
57
59
  }, [data])
58
60
 
59
- useEffect(() =>{
61
+ useEffect(() => {
60
62
  if (league !== data.parameters.league) {
61
63
  console.log('league', league)
62
64
  setLeague(data.parameters.league!)
@@ -113,6 +115,8 @@ export const App = ({ data, start }: Props) => {
113
115
  <FormattedText text={parameters.title0 || "Partidos Mundial"} format={parameters.titleFormat} />
114
116
  </div>
115
117
  }
118
+ <FormattedText text={today} format={parameters.formatMjs} />
119
+ <FormattedText text={timezone} format={parameters.formatMjs} />
116
120
  <Table dataFixture={dataFixture} />
117
121
  </div> :
118
122
  <div
@@ -136,6 +140,8 @@ export const App = ({ data, start }: Props) => {
136
140
  flex: '1 1 0%',
137
141
  flexDirection: 'column',
138
142
  }}>
143
+ <FormattedText text={today} format={parameters.formatMjs} />
144
+ <FormattedText text={timezone} format={parameters.formatMjs} />
139
145
  <FormattedText text={msj0 || "Sin partidos"} format={parameters.formatMjs} />
140
146
  </div>
141
147
  </div>
@@ -3,12 +3,13 @@ const axios = require("axios");
3
3
 
4
4
  export const getFixture = async (league: string) => {
5
5
  const today = moment().format('YYYY-MM-DD')
6
+ console.log("🚀 ~ getFixture ~ today:", today)
6
7
  const year = moment().format('YYYY')
7
8
  const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone
8
9
  const options = {
9
10
  method: 'GET',
10
11
  url: 'https://api-football-v1.p.rapidapi.com/v3/fixtures',
11
- params: { date: `${today}`, league: league, season: `${year}`, timezone: `${timezone}` },
12
+ params: { date: `2024-06-22`, league: league, season: `${year}`, timezone: `${timezone}` },
12
13
  headers: {
13
14
  'X-RapidAPI-Key': 'a7e693d4c5msh72a2ff2020fd601p12dd08jsn0f168421d7bb',
14
15
  'X-RapidAPI-Host': 'api-football-v1.p.rapidapi.com'