@opexa/portal-components 0.0.136 → 0.0.138

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.
@@ -3,7 +3,7 @@ import invariant from 'tiny-invariant';
3
3
  import { claimCashbackBonus } from '../../services/wallet.js';
4
4
  import { getQueryClient } from '../../utils/getQueryClient.js';
5
5
  import { getClaimCashbackBonusMutationKey } from '../../utils/mutationKeys.js';
6
- import { getCashbackBonusesCountQueryKey, getCashbackBonusesQueryKey, } from '../../utils/queryKeys.js';
6
+ import { getCashbackBonusesQueryKey } from '../../utils/queryKeys.js';
7
7
  import { getSession } from '../services/getSession.js';
8
8
  export const useClaimCashbackBonusMutation = (config) => {
9
9
  const queryClient = getQueryClient();
@@ -18,10 +18,15 @@ export const useClaimCashbackBonusMutation = (config) => {
18
18
  Authorization: `Bearer ${session.token}`,
19
19
  },
20
20
  });
21
- queryClient.setQueryData(getCashbackBonusesQueryKey(), (prev) => prev?.filter((bonus) => bonus.id !== id));
22
- queryClient.setQueryData(getCashbackBonusesCountQueryKey(), (prev) => {
23
- return !prev ? 0 : prev > 0 ? prev - 1 : 0;
24
- });
21
+ queryClient.setQueryData(getCashbackBonusesQueryKey(), (prev) => prev?.map((bonus) => {
22
+ if (bonus.id !== id) {
23
+ return {
24
+ ...bonus,
25
+ balance: '0',
26
+ };
27
+ }
28
+ return bonus;
29
+ }));
25
30
  },
26
31
  });
27
32
  };
@@ -13,6 +13,7 @@ import { useClaimCashbackBonusMutation } from '../../client/hooks/useClaimCashba
13
13
  import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
14
14
  import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
15
15
  import { useRemainingTime } from '../../client/hooks/useRemainingTime.js';
16
+ import { toaster } from '../../client/utils/toaster.js';
16
17
  import { StopWatchIcon } from '../../icons/StopWatchIcon.js';
17
18
  import moneyOnHand from '../../images/money-on-hand.png';
18
19
  import piggyBank from '../../images/piggy-bank.png';
@@ -67,16 +68,34 @@ function CashbackBonus(props) {
67
68
  const bonus = props.data;
68
69
  const cashback = bonus.cashback;
69
70
  const localeInfo = useLocaleInfo();
70
- const claimCashbackBonusMutation = useClaimCashbackBonusMutation();
71
+ const claimCashbackBonusMutation = useClaimCashbackBonusMutation({
72
+ onSuccess() {
73
+ toaster.success({
74
+ description: 'Bonus claimed successfully!',
75
+ });
76
+ },
77
+ onError(error) {
78
+ toaster.error({
79
+ description: error.message,
80
+ });
81
+ },
82
+ });
83
+ const balance = parseDecimal(bonus.balance, 0);
84
+ const total = parseDecimal(bonus.total, 0);
85
+ const minimumCashback = parseDecimal(props.data.cashback.minimumCashback, 0);
86
+ const maximumMonthlyCashback = parseDecimal(props.data.cashback.maximumMonthlyCashback, 0);
87
+ const disabled = balance <= 0 || total > maximumMonthlyCashback || balance < minimumCashback;
71
88
  return (_jsxs("div", { className: "border-border-primary bg-bg-tertiary flex flex-col overflow-hidden rounded-2xl border", children: [cashback.banner?.url ? (_jsx(Image, { src: cashback.banner.url, alt: "", width: 400, height: 200, className: "h-[11.25rem] w-full object-cover" })) : (_jsx("div", { style: {
72
89
  background: 'radial-gradient(75.21% 75.21% at 50% 50%, rgba(249, 163, 8, 0.3) 0%, rgba(0, 0, 0, 0) 100%), var(--color-bg-primary-alt)',
73
90
  }, children: _jsx(Image, { src: moneyOnHand, alt: "", className: "mx-auto h-[11.25rem] w-auto shrink-0 object-cover", draggable: false, width: 600, height: 600 }) })), _jsxs("div", { className: "flex grow flex-col px-xl py-3xl", children: [_jsx("p", { className: "line-clamp-1 text-center text-xl font-semibold text-white", children: cashback.name }), _jsx("h2", { className: "mt-2 text-center text-3xl font-semibold text-white", children: formatNumber(bonus.balance, {
74
91
  currency: localeInfo.currency.code,
75
92
  }) }), _jsx("div", { className: "text-text-secondary-700 mt-2 line-clamp-1 text-center text-sm", dangerouslySetInnerHTML: {
76
93
  __html: cashback.description,
77
- } }), _jsx("div", { className: "grow" }), _jsx(Button, { size: "sm", className: "mt-6", disabled: claimCashbackBonusMutation.isPending, onClick: () => {
94
+ } }), _jsx("div", { className: "grow" }), _jsx(Button, { size: "sm", className: "mt-6", disabled: claimCashbackBonusMutation.isPending || disabled, onClick: () => {
78
95
  claimCashbackBonusMutation.mutate(bonus.id);
79
- }, children: "Claim" })] })] }));
96
+ }, title: disabled
97
+ ? `You need ${formatNumber(minimumCashback - balance)} to claim this cashback.`
98
+ : undefined, children: "Claim" })] })] }));
80
99
  }
81
100
  function SpotBonus() {
82
101
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -1,9 +1,7 @@
1
1
  import type { ImageProps } from 'next/image';
2
2
  import type { ReactNode } from 'react';
3
- type DisclaimerProps = {
4
- version?: 'v1';
5
- logo: ImageProps['src'];
6
- } | {
3
+ import { type DisclaimerV1Props } from './DisclaimerV1';
4
+ type DisclaimerProps = DisclaimerV1Props | {
7
5
  version: 'v2';
8
6
  logo: ImageProps['src'];
9
7
  siteName: string;
@@ -6,5 +6,5 @@ export function Disclaimer(props) {
6
6
  if (props.version === 'v2') {
7
7
  return (_jsx(DisclaimerV2, { logo: props.logo, siteName: props.siteName, responsibleGamingContent: props.responsibleGamingContent, termsOfUseContent: props.termsOfUseContent, responsibleGamingLogo: props.responsibleGamingLogo }));
8
8
  }
9
- return _jsx(DisclaimerV1, { logo: props.logo });
9
+ return _jsx(DisclaimerV1, { ...props });
10
10
  }
@@ -1,5 +1,7 @@
1
1
  import type { ImageProps } from 'next/image';
2
- export interface DisclaimerProps {
2
+ export interface DisclaimerV1Props {
3
+ version?: 'v1';
3
4
  logo: ImageProps['src'];
5
+ termsAndConditionsUrl?: string;
4
6
  }
5
- export declare function DisclaimerV1(props: DisclaimerProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function DisclaimerV1(props: DisclaimerV1Props): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import Image from 'next/image';
4
+ import Link from 'next/link';
4
5
  import { useRef } from 'react';
5
6
  import pagcorLogo from '../../images/pagcor.png';
6
7
  import responsibleGamingLogo from '../../images/responsible-gaming.png';
@@ -11,5 +12,5 @@ import { useDisclaimer } from './useDisclaimer.js';
11
12
  export function DisclaimerV1(props) {
12
13
  const disclaimer = useDisclaimer();
13
14
  const acceptTriggerRef = useRef(null);
14
- return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, initialFocusEl: () => acceptTriggerRef.current, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)]", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsx(Dialog.Title, { className: "mt-3xl text-center text-lg font-semibold", children: "Age Verification" }), _jsxs(Dialog.Description, { className: "text-text-tertiary-600 mt-xs text-center text-sm", children: ["By entering this website I acknowledge and confirm I am 21 years of age and I agree with the", ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", children: "Terms and Conditions." })] }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx(Button, { ref: acceptTriggerRef, type: "button", className: "mt-4xl", onClick: disclaimer.close, children: "Accept" })] }) })] }) }));
15
+ return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, initialFocusEl: () => acceptTriggerRef.current, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)]", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsx(Dialog.Title, { className: "mt-3xl text-center text-lg font-semibold", children: "Age Verification" }), _jsxs(Dialog.Description, { className: "text-text-tertiary-600 mt-xs text-center text-sm", children: ["By entering this website I acknowledge and confirm I am 21 years of age and I agree with the", ' ', _jsx(Link, { href: props.termsAndConditionsUrl ?? '/terms-and-conditions', target: "_blank", rel: "noopener noreferrer", className: "text-brand-400 whitespace-nowrap underline underline-offset-2", prefetch: false, children: "Terms and Conditions." })] }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx(Button, { ref: acceptTriggerRef, type: "button", className: "mt-4xl", onClick: disclaimer.close, children: "Accept" })] }) })] }) }));
15
16
  }
@@ -46,7 +46,7 @@ export function GamesSearch(props) {
46
46
  }, className: "block w-full shadow-sm", children: [_jsx(Image, { src: getGameImageUrl({
47
47
  reference: game.reference,
48
48
  provider: game.provider,
49
- }), alt: "", width: 200, height: 200, priority: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: "bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold", children: game.name })] }, game.id))) })) }), _jsx(Presence, { present: gamesQuery.hasNextPage, children: _jsx(Button, { variant: "outline", className: "mx-auto mt-4xl w-fit", onClick: () => gamesQuery.fetchNextPage(), children: "Load More" }) })] }))] })) })) }) })] }) }));
49
+ }), alt: "", width: 200, height: 200, loading: "lazy", unoptimized: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: "bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold", children: game.name })] }, game.id))) })) }), _jsx(Presence, { present: gamesQuery.hasNextPage, children: _jsx(Button, { variant: "outline", className: "mx-auto mt-4xl w-fit", onClick: () => gamesQuery.fetchNextPage(), children: "Load More" }) })] }))] })) })) }) })] }) }));
50
50
  }
51
51
  function Alert({ message }) {
52
52
  return (_jsxs("div", { className: "py-lg", role: "alert", "aria-live": "polite", children: [_jsx("div", { className: "bg-bg-secondary shadow-xs border-border-primary mx-auto flex size-12 items-center justify-center rounded-lg border", children: _jsx(SearchLgIcon, { className: "text-text-secondary-700 size-6" }) }), _jsx("p", { className: "text-text-secondary-700 mt-4 text-center", children: message })] }));
@@ -41,7 +41,7 @@ export function NewsFeedCarousel(props) {
41
41
  onSelect(emblaApi);
42
42
  emblaApi.on('reInit', onSelect).on('select', onSelect);
43
43
  }, [emblaApi, onSelect]);
44
- return (_jsxs("div", { style: props.style, className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: heading }), _jsx("div", { className: "grow" }), _jsxs("div", { className: "flex items-center justify-center gap-xl", children: [_jsxs(Link, { href: viewAllUrl, className: "text-button-tertiary-fg flex gap-sm text-sm font-semibold", children: ["See All", _jsx(ChevronRightIcon, { className: "size-5 lg:hidden" })] }), _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", onClick: onPrevButtonClick, disabled: prevBtnDisabled, "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-l-none", onClick: onNextButtonClick, disabled: nextBtnDisabled, "aria-label": "Next", children: _jsx(ArrowRightIcon, { className: "size-5" }) })] })] })] }), empty && (_jsx(Empty, { icon: Tv03Icon, title: "No News", message: "No news is currently available.", className: "mt-8" })), !empty && (_jsx(_Fragment, { children: _jsx("div", { ref: emblaRef, className: "relative mt-lg lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid auto-cols-[100%] grid-flow-col gap-1.5 lg:auto-cols-[calc((100%-(1.25rem*2))/3)] lg:gap-2xl'), children: props.newsFeed.map((news) => (_jsxs("div", { className: "bg-bg-primary-alt border-border-primary flex flex-col overflow-hidden rounded-2xl border shadow-md", children: [_jsx(Image, { src: news.image, alt: "", width: 400, height: 274, className: "block h-[15.25rem] w-full object-cover" }), _jsxs("div", { className: "flex grow flex-col p-3xl", children: [_jsxs("div", { className: "grow", children: [_jsx("p", { className: "text-brand-400 text-sm font-semibold", children: news.category }), _jsx("h2", { className: "mt-2 line-clamp-1 text-lg font-semibold", children: news.title }), _jsx("p", { className: "text-text-tertiary-600 mt-xs line-clamp-3", dangerouslySetInnerHTML: {
44
+ return (_jsxs("div", { style: props.style, className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: heading }), _jsx("div", { className: "grow" }), _jsxs("div", { className: "flex items-center justify-center gap-xl", children: [_jsxs(Link, { href: viewAllUrl, className: "text-button-tertiary-fg flex gap-sm text-sm font-semibold", children: ["See All", _jsx(ChevronRightIcon, { className: "size-5 lg:hidden" })] }), _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", onClick: onPrevButtonClick, disabled: prevBtnDisabled, "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-l-none", onClick: onNextButtonClick, disabled: nextBtnDisabled, "aria-label": "Next", children: _jsx(ArrowRightIcon, { className: "size-5" }) })] })] })] }), empty && (_jsx(Empty, { icon: Tv03Icon, title: "No News", message: "No news is currently available.", className: "mt-8" })), !empty && (_jsx(_Fragment, { children: _jsx("div", { ref: emblaRef, className: "relative mt-lg lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid auto-cols-[100%] grid-flow-col gap-1.5 lg:auto-cols-[calc((100%-(1.25rem*2))/3)] lg:gap-2xl'), children: props.newsFeed.map((news) => (_jsxs("div", { className: "bg-bg-primary-alt border-border-primary flex flex-col overflow-hidden rounded-2xl border shadow-md", children: [_jsx(Image, { src: news.image, alt: "", width: 400, height: 274, loading: "lazy", unoptimized: true, className: "block h-[15.25rem] w-full object-cover" }), _jsxs("div", { className: "flex grow flex-col p-3xl", children: [_jsxs("div", { className: "grow", children: [_jsx("p", { className: "text-brand-400 text-sm font-semibold", children: news.category }), _jsx("h2", { className: "mt-2 line-clamp-1 text-lg font-semibold", children: news.title }), _jsx("p", { className: "text-text-tertiary-600 mt-xs line-clamp-3", dangerouslySetInnerHTML: {
45
45
  __html: news.content,
46
46
  } })] }), _jsx(Button, { asChild: true, className: "mt-2xl", children: _jsx(Link, { href: `${viewDetailsUrl}/${news.id}`, children: "Read More" }) })] })] }, news.id))) }) }) }))] }));
47
47
  }
@@ -11,7 +11,7 @@ export function Cashback({ data, viewDetailsUrl }) {
11
11
  })));
12
12
  const claimablePromos = useAvailablePromosQuery().data ?? [];
13
13
  const claimable = claimablePromos.find((availablePromo) => availablePromo.id === data.id);
14
- return (_jsxs("div", { className: "border-border-secondary bg-accent-50 bg-bg-primary-alt relative flex h-full flex-col overflow-hidden rounded-2xl border", children: [data.banner.url && (_jsx(Image, { src: data.banner.url, alt: data.name, width: 400, height: 202, className: "block aspect-[365/180] w-full object-cover" })), _jsxs("div", { className: "flex flex-grow flex-col px-4 pb-3xl pt-2xl", children: [_jsx("div", { className: "w-full grow text-center text-xl font-semibold", children: data.name }), _jsxs("div", { className: "mt-auto flex flex-col gap-3 pt-4 lg:flex-row", children: [claimable && (_jsx(Button, { size: "sm", onClick: () => {
14
+ return (_jsxs("div", { className: "border-border-secondary bg-accent-50 bg-bg-primary-alt relative flex h-full flex-col overflow-hidden rounded-2xl border", children: [data.banner.url && (_jsx(Image, { src: data.banner.url, alt: data.name, width: 400, height: 202, loading: "lazy", unoptimized: true, className: "block aspect-[365/180] w-full object-cover" })), _jsxs("div", { className: "flex flex-grow flex-col px-4 pb-3xl pt-2xl", children: [_jsx("div", { className: "w-full grow text-center text-xl font-semibold", children: data.name }), _jsxs("div", { className: "mt-auto flex flex-col gap-3 pt-4 lg:flex-row", children: [claimable && (_jsx(Button, { size: "sm", onClick: () => {
15
15
  globalStore.depositWithdrawal.setOpen(true);
16
16
  globalStore.depositWithdrawal.setPromo(data.id);
17
17
  }, children: "Get bonus" })), _jsx(Button, { size: "sm", variant: "outline", asChild: true, children: _jsx(Link, { href: `${viewDetailsUrl}/${data.id}`, children: "Read more" }) })] })] })] }));
@@ -3,5 +3,5 @@ import Image from 'next/image';
3
3
  import Link from 'next/link';
4
4
  import { Button } from '../../ui/Button/index.js';
5
5
  export function CustomPromo({ data, viewDetailsUrl }) {
6
- return (_jsxs("div", { className: "border-border-secondary bg-accent-50 bg-bg-primary-alt relative flex h-full flex-col overflow-hidden rounded-2xl border", children: [_jsx(Image, { src: data.banner, alt: data.name, width: 400, height: 202, className: "block aspect-[365/180] w-full object-cover" }), _jsxs("div", { className: "flex flex-grow flex-col px-4 pb-3xl pt-2xl", children: [_jsx("div", { className: "w-full grow text-center text-xl font-semibold", children: data.name }), _jsx("div", { className: "mt-auto flex flex-col gap-3 pt-4 lg:flex-row", children: _jsx(Button, { size: "sm", variant: "outline", asChild: true, children: _jsx(Link, { href: `${viewDetailsUrl}/${data.id}`, children: "Read more" }) }) })] })] }));
6
+ return (_jsxs("div", { className: "border-border-secondary bg-accent-50 bg-bg-primary-alt relative flex h-full flex-col overflow-hidden rounded-2xl border", children: [_jsx(Image, { src: data.banner, alt: data.name, width: 400, height: 202, loading: "lazy", unoptimized: true, className: "block aspect-[365/180] w-full object-cover" }), _jsxs("div", { className: "flex flex-grow flex-col px-4 pb-3xl pt-2xl", children: [_jsx("div", { className: "w-full grow text-center text-xl font-semibold", children: data.name }), _jsx("div", { className: "mt-auto flex flex-col gap-3 pt-4 lg:flex-row", children: _jsx(Button, { size: "sm", variant: "outline", asChild: true, children: _jsx(Link, { href: `${viewDetailsUrl}/${data.id}`, children: "Read more" }) }) })] })] }));
7
7
  }
@@ -11,7 +11,7 @@ export function Promo({ data, viewDetailsUrl }) {
11
11
  })));
12
12
  const claimablePromos = useAvailablePromosQuery().data ?? [];
13
13
  const claimable = claimablePromos.find((availablePromo) => availablePromo.id === data.id);
14
- return (_jsxs("div", { className: "border-border-secondary bg-accent-50 bg-bg-primary-alt relative flex h-full flex-col overflow-hidden rounded-2xl border", children: [data.banner.url && (_jsx(Image, { src: data.banner.url, alt: data.name, width: 400, height: 202, className: "block aspect-[365/180] w-full object-cover" })), _jsxs("div", { className: "flex flex-grow flex-col px-4 pb-3xl pt-2xl", children: [_jsx("div", { className: "w-full grow text-center text-xl font-semibold", children: data.name }), _jsxs("div", { className: "mt-auto flex flex-col gap-3 pt-4 lg:flex-row", children: [claimable && (_jsx(Button, { size: "sm", onClick: () => {
14
+ return (_jsxs("div", { className: "border-border-secondary bg-accent-50 bg-bg-primary-alt relative flex h-full flex-col overflow-hidden rounded-2xl border", children: [data.banner.url && (_jsx(Image, { src: data.banner.url, alt: data.name, width: 400, height: 202, loading: "lazy", unoptimized: true, className: "block aspect-[365/180] w-full object-cover" })), _jsxs("div", { className: "flex flex-grow flex-col px-4 pb-3xl pt-2xl", children: [_jsx("div", { className: "w-full grow text-center text-xl font-semibold", children: data.name }), _jsxs("div", { className: "mt-auto flex flex-col gap-3 pt-4 lg:flex-row", children: [claimable && (_jsx(Button, { size: "sm", onClick: () => {
15
15
  globalStore.depositWithdrawal.setOpen(true);
16
16
  globalStore.depositWithdrawal.setPromo(data.id);
17
17
  }, children: "Get bonus" })), _jsx(Button, { size: "sm", variant: "outline", asChild: true, children: _jsx(Link, { href: `${viewDetailsUrl}/${data.id}`, children: "Read more" }) })] })] })] }));
@@ -78,7 +78,7 @@ export function Search(props) {
78
78
  }, children: [_jsx(Image, { src: getGameImageUrl({
79
79
  reference: game.reference,
80
80
  provider: game.provider,
81
- }), alt: "", width: 200, height: 200, priority: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: twMerge('bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold', classNames.gameThumbnailTitle), children: game.name })] }, game.id))) })] })), _jsx(Presence, { present: gamesQuery.hasNextPage, children: _jsx(Button, { variant: "outline", className: "mx-auto mt-12 w-fit", onClick: () => gamesQuery.fetchNextPage(), children: "Load More" }) })] }))] })) })] }) })] }) }));
81
+ }), alt: "", width: 200, height: 200, loading: "lazy", unoptimized: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: twMerge('bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold', classNames.gameThumbnailTitle), children: game.name })] }, game.id))) })] })), _jsx(Presence, { present: gamesQuery.hasNextPage, children: _jsx(Button, { variant: "outline", className: "mx-auto mt-12 w-fit", onClick: () => gamesQuery.fetchNextPage(), children: "Load More" }) })] }))] })) })] }) })] }) }));
82
82
  }
83
83
  function DebouncedInput(props) {
84
84
  const [value, setValue] = useControllableState({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.136",
3
+ "version": "0.0.138",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",