@opexa/portal-components 0.0.691 → 0.0.693
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.
|
@@ -18,14 +18,20 @@ export function GameProvidersList(props) {
|
|
|
18
18
|
.replace(':slug', data.slug)
|
|
19
19
|
: `/providers/${data.slug}`;
|
|
20
20
|
};
|
|
21
|
-
const
|
|
22
|
-
const
|
|
21
|
+
const featureFlag = useFeatureFlag();
|
|
22
|
+
const enabledProviders = featureFlag.enabled
|
|
23
23
|
? [...props.gameProviders, ...(props.futureGameProviders ?? [])]
|
|
24
24
|
: props.gameProviders;
|
|
25
|
-
const gameProviders =
|
|
25
|
+
const gameProviders = enabledProviders.map((provider) => GAME_PROVIDER_DATA[provider]);
|
|
26
26
|
const classNames = isString(props.className)
|
|
27
27
|
? { root: props.className }
|
|
28
28
|
: (props.className ?? {});
|
|
29
29
|
const chunked = useChunk(gameProviders, 24);
|
|
30
|
-
|
|
30
|
+
const items = props.showAllProviders
|
|
31
|
+
? gameProviders.slice(0, 23)
|
|
32
|
+
: chunked.loadedItems;
|
|
33
|
+
return (_jsxs("div", { className: classNames.root, children: [_jsx("h2", { className: "font-semibold text-lg", children: props.heading ?? 'Providers' }), _jsxs("div", { className: "mt-lg grid grid-cols-3 gap-1.5 lg:grid-cols-6 lg:gap-2.5", children: [props.showAllProviders && (_jsx(Link, { href: props.viewAllUrl ?? '/providers', className: twMerge('flex h-full w-full items-center justify-center overflow-hidden rounded-md bg-brand-800 font-extrabold lg:h-[5.75rem]', classNames.thumbnailRoot), "aria-label": `View all games`, children: _jsx("p", { className: "text-center text-4xl", children: " ALL" }) })), items.map((provider) => {
|
|
34
|
+
const customLogo = props.gameProviderImages?.[provider.id];
|
|
35
|
+
return (_jsx(Link, { href: viewGamesUrl(provider), className: twMerge('flex h-full w-full items-center overflow-hidden rounded-md bg-brand-800 lg:h-[5.75rem]', !customLogo && 'px-2 py-1.5', classNames.thumbnailRoot), "aria-label": `View ${provider.name} games`, children: _jsx(Image, { src: customLogo ?? provider.logo, alt: "", width: 300, height: 150, className: twMerge('mx-auto h-auto w-full', classNames.thumbnailImage) }) }, provider.id));
|
|
36
|
+
})] }), !props.showAllProviders && (_jsxs("div", { className: "mt-2xl flex flex-col items-center lg:mt-3xl", children: [_jsx(Progress.Root, { min: 0, max: chunked.totalItems, value: chunked.totalLoadedItems, onValueChange: noop, className: twMerge('w-[12.5rem]', classNames.progressRoot), children: _jsx(Progress.Track, { className: twMerge('bg-bg-tertiary', classNames.progressTrack), children: _jsx(Progress.Range, {}) }) }), _jsx("p", { className: "mt-md text-button-tertiary-fg text-sm", children: `Displaying ${chunked.totalLoadedItems} of ${chunked.totalItems}` }), chunked.hasNext && (_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, onClick: chunked.next, className: twMerge('mt-lg', classNames.loadMoreButton), children: "Load More" }))] }))] }));
|
|
31
37
|
}
|
|
@@ -37,6 +37,7 @@ import relaxgaming from '../images/game-providers/RELAX_GAMING.png';
|
|
|
37
37
|
import rtg from '../images/game-providers/RTG.png';
|
|
38
38
|
import saba from '../images/game-providers/SABA.png';
|
|
39
39
|
import sagaming from '../images/game-providers/SAGAMING.png';
|
|
40
|
+
import spadegaming from '../images/game-providers/SPADEGAMING.png';
|
|
40
41
|
import spinix from '../images/game-providers/SPINIX.png';
|
|
41
42
|
import spribe from '../images/game-providers/SPRIBE.png';
|
|
42
43
|
import yellowbat from '../images/game-providers/YELLOWBAT.png';
|
|
@@ -321,7 +322,7 @@ export const GAME_PROVIDER_DATA = {
|
|
|
321
322
|
id: 'ONEAPI_SPADEGAMING',
|
|
322
323
|
name: 'OneAPI Spadegaming',
|
|
323
324
|
slug: 'oneapi-spadegaming',
|
|
324
|
-
logo:
|
|
325
|
+
logo: spadegaming,
|
|
325
326
|
},
|
|
326
327
|
};
|
|
327
328
|
export const GAME_PROVIDERS = Object.values(GAME_PROVIDER_DATA).map(({ id }) => id);
|
|
Binary file
|