@opexa/portal-components 0.0.126 → 0.0.128
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.
- package/dist/components/FavoriteGames/FavoriteGames.client.js +2 -2
- package/dist/components/GameLaunch/GameLaunch.lazy.js +4 -4
- package/dist/components/Games/Game.js +4 -4
- package/dist/components/NewsFeed/NewsFeedCarousel.js +1 -1
- package/dist/components/NewsFeed/NewsFeedList.js +1 -1
- package/package.json +1 -1
|
@@ -53,12 +53,12 @@ function Item({ game, className, }) {
|
|
|
53
53
|
const session = sessionQuery.data;
|
|
54
54
|
const unmarkGameAsFavoriteMutation = useUnmarkGameAsFavoriteMutation({
|
|
55
55
|
onSuccess() {
|
|
56
|
-
toaster.
|
|
56
|
+
toaster.success({
|
|
57
57
|
description: 'Game removed from favorites',
|
|
58
58
|
});
|
|
59
59
|
},
|
|
60
60
|
onError() {
|
|
61
|
-
toaster.
|
|
61
|
+
toaster.error({
|
|
62
62
|
description: 'Failed to remove game from favorites',
|
|
63
63
|
});
|
|
64
64
|
},
|
|
@@ -49,24 +49,24 @@ export function GameLaunch() {
|
|
|
49
49
|
const endGameSessionMutation = useEndGameSessionMutation();
|
|
50
50
|
const markGameAsFavoriteMutation = useMarkGameAsFavoriteMutation({
|
|
51
51
|
onSuccess() {
|
|
52
|
-
toaster.
|
|
52
|
+
toaster.success({
|
|
53
53
|
description: 'Game added to favorites',
|
|
54
54
|
});
|
|
55
55
|
},
|
|
56
56
|
onError() {
|
|
57
|
-
toaster.
|
|
57
|
+
toaster.error({
|
|
58
58
|
description: 'Failed to add game to favorites',
|
|
59
59
|
});
|
|
60
60
|
},
|
|
61
61
|
});
|
|
62
62
|
const unmarkGameAsFavoriteMutation = useUnmarkGameAsFavoriteMutation({
|
|
63
63
|
onSuccess() {
|
|
64
|
-
toaster.
|
|
64
|
+
toaster.success({
|
|
65
65
|
description: 'Game removed from favorites',
|
|
66
66
|
});
|
|
67
67
|
},
|
|
68
68
|
onError() {
|
|
69
|
-
toaster.
|
|
69
|
+
toaster.error({
|
|
70
70
|
description: 'Failed to remove game from favorites',
|
|
71
71
|
});
|
|
72
72
|
},
|
|
@@ -22,24 +22,24 @@ export function Game(props) {
|
|
|
22
22
|
const favoriteGames = favoriteGamesQuery.data ?? [];
|
|
23
23
|
const markGameAsFavoriteMutation = useMarkGameAsFavoriteMutation({
|
|
24
24
|
onSuccess() {
|
|
25
|
-
toaster.
|
|
25
|
+
toaster.success({
|
|
26
26
|
description: 'Game added to favorites',
|
|
27
27
|
});
|
|
28
28
|
},
|
|
29
29
|
onError() {
|
|
30
|
-
toaster.
|
|
30
|
+
toaster.error({
|
|
31
31
|
description: 'Failed to add game to favorites',
|
|
32
32
|
});
|
|
33
33
|
},
|
|
34
34
|
});
|
|
35
35
|
const unmarkGameAsFavoriteMutation = useUnmarkGameAsFavoriteMutation({
|
|
36
36
|
onSuccess() {
|
|
37
|
-
toaster.
|
|
37
|
+
toaster.success({
|
|
38
38
|
description: 'Game removed from favorites',
|
|
39
39
|
});
|
|
40
40
|
},
|
|
41
41
|
onError() {
|
|
42
|
-
toaster.
|
|
42
|
+
toaster.error({
|
|
43
43
|
description: 'Failed to remove game from favorites',
|
|
44
44
|
});
|
|
45
45
|
},
|
|
@@ -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:
|
|
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: {
|
|
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
|
}
|
|
@@ -8,7 +8,7 @@ export function NewsFeedList(props) {
|
|
|
8
8
|
const empty = props.newsFeed.length <= 0;
|
|
9
9
|
const heading = props.heading ?? 'News';
|
|
10
10
|
const viewDetailsUrl = props.viewDetailsUrl ?? '/news';
|
|
11
|
-
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "text-lg font-semibold", children: heading }), empty && (_jsx(Empty, { icon: Tv03Icon, title: "No News", message: "No news is currently available.", className: "mt-8" })), !empty && (_jsx("div", { className: "mt-lg grid gap-3xl lg:grid-cols-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:
|
|
11
|
+
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "text-lg font-semibold", children: heading }), empty && (_jsx(Empty, { icon: Tv03Icon, title: "No News", message: "No news is currently available.", className: "mt-8" })), !empty && (_jsx("div", { className: "mt-lg grid gap-3xl lg:grid-cols-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: {
|
|
12
12
|
__html: news.content,
|
|
13
13
|
} })] }), _jsx(Button, { asChild: true, className: "mt-2xl", children: _jsx(Link, { href: `${viewDetailsUrl}/${news.id}`, children: "Read More" }) })] })] }, news.id))) }))] }));
|
|
14
14
|
}
|