@opexa/portal-components 0.0.76 → 0.0.78
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.
|
@@ -16,5 +16,5 @@ export function GamesList__client(props) {
|
|
|
16
16
|
});
|
|
17
17
|
return (_jsxs("div", { className: props.className, children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Games' }), totalRows <= 0 && (_jsx(Empty, { icon: loading ? SpinnerIcon : GamingPad01Icon, title: loading ? 'Just a moment' : 'No games', message: loading
|
|
18
18
|
? 'Fetching latest games...'
|
|
19
|
-
: 'No game is currently available. Please check back later', className: "mt-lg" })), totalRows >= 1 && (_jsxs(_Fragment, { children: [_jsx("div", { className: "mt-lg grid grid-cols-3 gap-1.5 lg:grid-cols-6 lg:gap-2.5", children: availableRows.map((game) => (_jsx(GameContext, { value: game, children: _jsx(Game, { badge: props.badge, gameNameClass: props.gameNameClass }) }, game.id))) }), _jsxs("div", { className: "mt-3xl flex flex-col items-center", children: [_jsx(Progress.Root, { min: 0, max: totalRows, value: totalAvailableRows, onValueChange: noop, className: "w-[12.5rem]", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { className: "text-button-tertiary-fg mt-md text-sm", children: `Displaying ${totalAvailableRows} of ${totalRows}` }), hasNextPage && (_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, onClick: next, className: "mt-lg", children: "Load More" }))] })] }))] }));
|
|
19
|
+
: 'No game is currently available. Please check back later', className: "mt-lg" })), totalRows >= 1 && (_jsxs(_Fragment, { children: [_jsx("div", { className: "mt-lg grid grid-cols-3 gap-1.5 lg:grid-cols-6 lg:gap-2.5", children: availableRows.map((game) => (_jsx(GameContext, { value: game, children: _jsx(Game, { badge: props.badge, gameNameClass: props.gameNameClass }) }, game.id))) }), _jsxs("div", { className: "mt-3xl flex flex-col items-center", children: [_jsx(Progress.Root, { min: 0, max: totalRows, value: totalAvailableRows, onValueChange: noop, className: "w-[12.5rem]", children: _jsx(Progress.Track, { className: "bg-bg-tertiary", children: _jsx(Progress.Range, {}) }) }), _jsx("p", { className: "text-button-tertiary-fg mt-md text-sm", children: `Displaying ${totalAvailableRows} of ${totalRows}` }), hasNextPage && (_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, onClick: next, className: "mt-lg", children: "Load More" }))] })] }))] }));
|
|
20
20
|
}
|
|
@@ -5,7 +5,7 @@ export function getGameProviderData(query) {
|
|
|
5
5
|
return GAME_PROVIDER_DATA[query];
|
|
6
6
|
}
|
|
7
7
|
const arr = Object.values(GAME_PROVIDER_DATA);
|
|
8
|
-
const obj = arr.find((data) => data.
|
|
8
|
+
const obj = arr.find((data) => data.slug === query);
|
|
9
9
|
return obj ?? null;
|
|
10
10
|
}
|
|
11
11
|
export function getGameProviderDataOrThrow(query) {
|
|
@@ -5,7 +5,7 @@ export function getGameTypeData(query) {
|
|
|
5
5
|
return GAME_TYPE_DATA[query];
|
|
6
6
|
}
|
|
7
7
|
const arr = Object.values(GAME_TYPE_DATA);
|
|
8
|
-
const obj = arr.find((data) => data.
|
|
8
|
+
const obj = arr.find((data) => data.slug === query);
|
|
9
9
|
return obj ?? null;
|
|
10
10
|
}
|
|
11
11
|
export function getGameTypeDataOrThrow(query) {
|