@opexa/portal-components 0.0.905 → 0.0.906
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/SingleSignOn/SingleSignOn.d.ts +4 -2
- package/dist/components/SingleSignOn/SingleSignOn.js +22 -10
- package/dist/images/close-chest.png +0 -0
- package/dist/images/open-chest.png +0 -0
- package/dist/images/tournament-bg-1.webp +0 -0
- package/dist/images/tournament-bg-2.webp +0 -0
- package/dist/images/tournament-bg-3.webp +0 -0
- package/dist/images/trophy.png +0 -0
- package/package.json +1 -1
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export declare function SingleSignOn(): import("react/jsx-runtime").JSX.Element |
|
|
2
|
-
export declare function VerifyMobileNumber(
|
|
1
|
+
export declare function SingleSignOn(): import("react/jsx-runtime").JSX.Element | null;
|
|
2
|
+
export declare function VerifyMobileNumber({ onClose }: {
|
|
3
|
+
onClose?: () => void;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -31,15 +31,22 @@ export function SingleSignOn() {
|
|
|
31
31
|
const router = useRouter();
|
|
32
32
|
const partnerId = params.partnerId;
|
|
33
33
|
const token = searchParams.get('token');
|
|
34
|
+
const [isSsoOpen, setIsSsoOpen] = useState(true);
|
|
35
|
+
const [showVerifyDialog, setShowVerifyDialog] = useState(false);
|
|
34
36
|
const ssoMutation = useSignInSSOMutation({
|
|
35
37
|
onSuccess: () => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
toaster.success({
|
|
39
|
+
description: 'Account created successfully',
|
|
40
|
+
});
|
|
41
|
+
setIsSsoOpen(false);
|
|
42
|
+
setShowVerifyDialog(true);
|
|
39
43
|
},
|
|
40
|
-
onError: (
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
onError: () => {
|
|
45
|
+
toaster.error({
|
|
46
|
+
description: 'Account creation failed',
|
|
47
|
+
});
|
|
48
|
+
setIsSsoOpen(false);
|
|
49
|
+
router.push('/');
|
|
43
50
|
},
|
|
44
51
|
});
|
|
45
52
|
// biome-ignore lint/correctness/useExhaustiveDependencies: We only want to trigger the mutation when the URL parameters change.
|
|
@@ -50,15 +57,19 @@ export function SingleSignOn() {
|
|
|
50
57
|
}
|
|
51
58
|
}, [partnerId, token]);
|
|
52
59
|
if (ssoMutation.isPending) {
|
|
53
|
-
return (_jsx(Dialog.Root, { open:
|
|
60
|
+
return (_jsx(Dialog.Root, { open: isSsoOpen, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: "flex items-center", children: _jsxs(Dialog.Content, { className: "flex h-[333px] w-[375px] flex-col items-center space-y-4 bg-[#111827] p-6 text-center", style: {
|
|
54
61
|
backgroundImage: `url(${lightBg.src})`,
|
|
55
62
|
}, children: [_jsx(Image, { src: inplayLogo, alt: "inplay logo", width: 82, height: 34, className: "h-auto w-[82px]" }), _jsx("div", { className: "mb-4 h-7 w-7 animate-spin rounded-full border-4 border-[#101730] border-t-[#F05027]" }), _jsx("div", { className: "text-[#CECFD2] text-sm", children: "We\u2019re creating an account for you..." }), _jsx("div", { className: "text-[#CECFD2] text-sm", children: "In the meantime, you can watch your favorite series on CinePop!" }), _jsxs("div", { className: "pt-3", children: [_jsx(Image, { src: cinePopLogo, alt: "cine poplogo", width: 151, height: 24, className: "mx-auto mb-2 h-auto w-[151px]" }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { src: secretConfessionsLogo, alt: "secret confessions logo", width: 104, height: 53, className: "h-auto w-[104px]" }), _jsx(Image, { src: dearUtolLogo, alt: "dear utol logo", width: 105, height: 53, className: "h-auto w-[105px]" }), _jsx(Image, { src: mariasDiary, alt: "maria's diary logo", width: 104, height: 53, className: "h-auto w-[104px]" })] })] })] }) })] }) }));
|
|
56
63
|
}
|
|
57
|
-
if (
|
|
58
|
-
return _jsx(VerifyMobileNumber, {
|
|
64
|
+
if (showVerifyDialog) {
|
|
65
|
+
return (_jsx(VerifyMobileNumber, { onClose: () => {
|
|
66
|
+
setShowVerifyDialog(false);
|
|
67
|
+
router.push('/');
|
|
68
|
+
} }));
|
|
59
69
|
}
|
|
70
|
+
return null;
|
|
60
71
|
}
|
|
61
|
-
export function VerifyMobileNumber() {
|
|
72
|
+
export function VerifyMobileNumber({ onClose }) {
|
|
62
73
|
const [step, setStep] = useState(1);
|
|
63
74
|
const sendVerificationCodeMutation = useSendVerificationCodeMutation({
|
|
64
75
|
onSuccess: () => {
|
|
@@ -81,6 +92,7 @@ export function VerifyMobileNumber() {
|
|
|
81
92
|
title: 'Verification Successful',
|
|
82
93
|
description: 'Your mobile number has been verified.',
|
|
83
94
|
});
|
|
95
|
+
onClose?.();
|
|
84
96
|
},
|
|
85
97
|
onError: (err) => {
|
|
86
98
|
const errorMessage = err.name === 'Forbidden'
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/images/trophy.png
CHANGED
|
Binary file
|