Skip to content

Commit

Permalink
fix: #1061;
Browse files Browse the repository at this point in the history
  • Loading branch information
migbash committed Feb 21, 2023
1 parent 2f0205c commit 0b1b318
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@
return;
}
$: if (browser && SPORTBOOK_INFO && SPORTBOOK_DETAILS_LIST) {
widget_init()
}
function trigger_event_google(action: string) {
if (
action === 'fixtures_football_fixtures_h2h'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@
return;
}
$: if (browser && SPORTBOOK_INFO && SPORTBOOK_DETAILS_LIST) {
widget_init()
}
/**
* Description
* ---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@
}, 150);
}
$: if (browser && SPORTBOOK_INFO && SPORTBOOK_DETAILS_LIST) {
widget_init()
}
// ~~~~~~~~~~~~~~~~~~~~~
// VIEWPORT CHANGES
// ~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 4 additions & 0 deletions src/lib/components/fixtures_page/votes/Vote_Widget.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@
return;
}
$: if (browser && SPORTBOOK_INFO && SPORTBOOK_DETAILS_LIST) {
widget_init()
}
/**
* Description
* ---
Expand Down
20 changes: 18 additions & 2 deletions src/lib/components/page/fixture/Layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
import { viewport_change } from '$lib/utils/platform-functions';
import SvelteSeo from 'svelte-seo';
import Breadcrumb from './Breadcrumb.svelte';
import type { GeoJsResponse } from '$lib/models/geojs-types';
import { get } from '$lib/api/utils';
let PAGE_SEO: REDIS_CACHE_SINGLE_fixtures_seo_response;
let FIXTURE_INFO: REDIS_CACHE_SINGLE_fixtures_page_info_response;
Expand Down Expand Up @@ -139,8 +141,8 @@
$page.data.FIXTURE_H2H_TRANSLATION;
$: STANDINGS_T = $page.data.STANDINGS_T;
$: STANDINGS_DATA = $page.data.STANDINGS_DATA;
$: SPORTBOOK_MAIN = $page.data.SPORTBOOK_MAIN;
$: SPORTBOOK_ALL = $page.data.SPORTBOOK_ALL;
// $: SPORTBOOK_MAIN = $page.data.SPORTBOOK_MAIN;
// $: SPORTBOOK_ALL = $page.data.SPORTBOOK_ALL;
$: country_link =
FIXTURE_INFO?.data?.country == undefined
Expand All @@ -161,6 +163,20 @@
// PAGE METHODS
// ~~~~~~~~~~~~~~~~~~~~~
$: if (browser && $userBetarenaSettings && $userBetarenaSettings.country_bookmaker != undefined) {
get_sportbooks()
}
async function get_sportbooks() {
let userGeo = $userBetarenaSettings.country_bookmaker.toString().toLowerCase()
SPORTBOOK_MAIN = await get("/api/cache/tournaments/sportbook?geoPos="+userGeo) as Cache_Single_SportbookDetails_Data_Response;
// console.log('SPORTBOOK_MAIN', SPORTBOOK_MAIN)
SPORTBOOK_MAIN = SPORTBOOK_MAIN
SPORTBOOK_ALL = await get("/api/cache/tournaments/sportbook?all=true&geoPos="+userGeo) as Cache_Single_SportbookDetails_Data_Response[];
SPORTBOOK_ALL = SPORTBOOK_ALL
}
$: SPORTBOOK_MAIN = SPORTBOOK_MAIN
$: SPORTBOOK_ALL = SPORTBOOK_ALL
// ~~~~~~~~~~~~~~~~~~~~~
// VIEWPORT CHANGES | IMPORTANT
// ~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit 0b1b318

Please sign in to comment.