added api connect, refactor styles

This commit is contained in:
Kostya
2024-04-06 16:52:12 +03:00
parent d8977ae282
commit 2f424a8e4e
3 changed files with 62 additions and 24 deletions

View File

@@ -85,3 +85,25 @@ export async function JoinJackpotGame(userData, amount) {
console.log('Fetch error')
}
}
export async function getJackpotHistoryGame () {
try {
const response = await fetch(`${BackendApiUrl}/GameJackpot/GetNewestJackpotGames`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
redirect: "follow"
})
if (!response.ok) {
console.log('Fetch error:', response.status)
}
console.log(response)
return await response.json()
}
catch (error) {
console.log('Fetch error')
}
}