@crossmint/client-sdk-react-ui 0.0.6 → 0.0.7
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossmint/client-sdk-react-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"author": "Paella Labs Inc",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": "https://github.com/CrossMint/crossmint-client-sdk",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"react": "^17.0.2",
|
|
41
41
|
"react-dom": "^17.0.2"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "07f81bb0e737f367f6fa016b5c5cdd1a13bbda0a"
|
|
44
44
|
}
|
|
@@ -6,6 +6,7 @@ import { CrossMintModalContext } from "./useCrossMintModal";
|
|
|
6
6
|
|
|
7
7
|
export interface CrossMintProviderProps extends CrossMintModalProps {
|
|
8
8
|
clientId: string;
|
|
9
|
+
auctionId?: string;
|
|
9
10
|
hideMintOnInactiveClient?: boolean;
|
|
10
11
|
development?: boolean;
|
|
11
12
|
children: ReactNode;
|
|
@@ -13,6 +14,7 @@ export interface CrossMintProviderProps extends CrossMintModalProps {
|
|
|
13
14
|
|
|
14
15
|
export const CrossMintProvider: FC<CrossMintProviderProps> = ({
|
|
15
16
|
clientId,
|
|
17
|
+
auctionId,
|
|
16
18
|
hideMintOnInactiveClient = false,
|
|
17
19
|
development = false,
|
|
18
20
|
children,
|
|
@@ -21,7 +23,11 @@ export const CrossMintProvider: FC<CrossMintProviderProps> = ({
|
|
|
21
23
|
const [visible, setVisible] = useState(false);
|
|
22
24
|
|
|
23
25
|
return (
|
|
24
|
-
<CrossMintStatusProvider
|
|
26
|
+
<CrossMintStatusProvider
|
|
27
|
+
clientId={clientId}
|
|
28
|
+
hideMintOnInactiveClient={hideMintOnInactiveClient}
|
|
29
|
+
auctionId={auctionId}
|
|
30
|
+
>
|
|
25
31
|
<CrossMintModalContext.Provider
|
|
26
32
|
value={{
|
|
27
33
|
visible,
|
|
@@ -19,7 +19,7 @@ export const CrossMintStatusButton: FC<StatusButtonProps> = ({
|
|
|
19
19
|
theme = "dark",
|
|
20
20
|
...props
|
|
21
21
|
}) => {
|
|
22
|
-
const { status, clientId } = useCrossMintStatus();
|
|
22
|
+
const { status, clientId, auctionId } = useCrossMintStatus();
|
|
23
23
|
|
|
24
24
|
const handleClick: MouseEventHandler<HTMLButtonElement> = useCallback(
|
|
25
25
|
(event) => {
|
|
@@ -27,7 +27,9 @@ export const CrossMintStatusButton: FC<StatusButtonProps> = ({
|
|
|
27
27
|
|
|
28
28
|
if (status === OnboardingRequestStatusResponse.WAITING_SUBMISSION) {
|
|
29
29
|
window.open(
|
|
30
|
-
`https://crossmint.io/developers/onboarding${
|
|
30
|
+
`https://crossmint.io/developers/onboarding${
|
|
31
|
+
clientId && `?clientId=${clientId}${auctionId && `&auctionId=${auctionId}`}`
|
|
32
|
+
}`,
|
|
31
33
|
"_blank"
|
|
32
34
|
);
|
|
33
35
|
return;
|
|
@@ -3,12 +3,14 @@ import { OnboardingRequestStatusResponse, CrossMintStatusContext } from "./useCr
|
|
|
3
3
|
|
|
4
4
|
export interface CrossMintStatusProviderProps {
|
|
5
5
|
clientId: string;
|
|
6
|
+
auctionId?: string;
|
|
6
7
|
hideMintOnInactiveClient: boolean;
|
|
7
8
|
children: ReactNode;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export const CrossMintStatusProvider: FC<CrossMintStatusProviderProps> = ({
|
|
11
12
|
clientId,
|
|
13
|
+
auctionId,
|
|
12
14
|
hideMintOnInactiveClient,
|
|
13
15
|
children,
|
|
14
16
|
}) => {
|
|
@@ -46,6 +48,7 @@ export const CrossMintStatusProvider: FC<CrossMintStatusProviderProps> = ({
|
|
|
46
48
|
value={{
|
|
47
49
|
status,
|
|
48
50
|
clientId,
|
|
51
|
+
auctionId,
|
|
49
52
|
hideMintOnInactiveClient,
|
|
50
53
|
}}
|
|
51
54
|
>
|