Skip to content

Commit 58e0833

Browse files
committed
refine zupass gating
1 parent 1ed2a74 commit 58e0833

2 files changed

Lines changed: 41 additions & 47 deletions

File tree

lib/components/event-schedule-new/zupass/zupass.tsx

Lines changed: 40 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { serializePodData } from "./serialize";
1515
import { pod, PODData } from "@parcnet-js/podspec";
1616
import { POD } from "@pcd/pod";
1717
import { eventShops } from "./event-shops-list";
18-
import { Info } from "lucide-react";
18+
import { Info, ArrowRight } from "lucide-react";
1919

2020
// HOC to wrap ParcnetClientProvider
2121
export const withParcnetProvider = <P extends object>(
@@ -60,29 +60,30 @@ function ZupassConnection(props: any) {
6060
setMounted(true);
6161
}, []);
6262

63-
useEffect(() => {
64-
if (initialConnectAttempted) return;
65-
66-
const initialConnect = () => {
67-
setInitialConnectAttempted(true);
68-
69-
const connectedInThePast = localStorage.getItem("zupassConnected");
70-
71-
if (
72-
z &&
73-
connectionState === ClientConnectionState.DISCONNECTED &&
74-
connectedInThePast
75-
) {
76-
try {
77-
z.connect();
78-
} catch (error) {
79-
console.error("Error auto connecting to Zupass:", error);
80-
}
81-
}
82-
};
63+
// Not sure if we should enable auto-connect - the popup is too aggressive
64+
// useEffect(() => {
65+
// if (initialConnectAttempted) return;
66+
67+
// const initialConnect = () => {
68+
// setInitialConnectAttempted(true);
8369

84-
initialConnect();
85-
}, [z, connectionState]);
70+
// const connectedInThePast = localStorage.getItem("zupassConnected");
71+
72+
// if (
73+
// z &&
74+
// connectionState === ClientConnectionState.DISCONNECTED &&
75+
// connectedInThePast
76+
// ) {
77+
// try {
78+
// z.connect();
79+
// } catch (error) {
80+
// console.error("Error auto connecting to Zupass:", error);
81+
// }
82+
// }
83+
// };
84+
85+
// initialConnect();
86+
// }, [z, connectionState]);
8687

8788
// Function to verify POD signature
8889
const verifyPodSignature = (podData: PODData): boolean => {
@@ -340,14 +341,14 @@ const EventVoucher = ({
340341
<div className="flex flex-col sm:flex-row gap-4">
341342
{/* Step 1 - Verify Devconnect ticket */}
342343
<div className="flex flex-col">
343-
<div className="text-sm text-gray-600 mb-1">
344+
<div className="text-xs text-[#4B4B66] mb-1">
344345
1. Verify Devconnect ticket
345346
</div>
346347

347348
<div className="mt-1 text-center flex flex-col items-start">
348349
<VoxelButton
349350
size="sm"
350-
className="outline-none"
351+
className="outline-none w-[150px]"
351352
color={
352353
connectionState === ClientConnectionState.CONNECTED
353354
? "green-1"
@@ -386,30 +387,16 @@ const EventVoucher = ({
386387

387388
{/* Arrow */}
388389
<div className="justify-center self-center hidden sm:flex">
389-
<svg
390-
className="w-5 h-5 text-gray-400"
391-
fill="none"
392-
stroke="currentColor"
393-
viewBox="0 0 24 24"
394-
>
395-
<path
396-
strokeLinecap="round"
397-
strokeLinejoin="round"
398-
strokeWidth={2}
399-
d="M17 8l4 4m0 0l-4 4m4-4H3"
400-
/>
401-
</svg>
390+
<ArrowRight size={20} />
402391
</div>
403392

404393
{/* Step 2 - Get event ticket */}
405394
<div className="flex flex-col ">
406-
<div className="text-sm text-gray-600 mb-1">
407-
<div className="text-sm text-gray-600">2. Get event ticket</div>
408-
</div>
395+
<div className="text-xs text-[#4B4B66] mb-1">2. Get event ticket</div>
409396
<div className="mt-1 text-center flex sm:flex-col items-start items-center gap-2 sm:gap-0">
410397
<VoxelButton
411398
disabled={!connectedWithCoupon}
412-
className={`outline-none`}
399+
className={`outline-none w-[150px]`}
413400
size="sm"
414401
onClick={() => {
415402
if (connectedWithCoupon) {
@@ -422,7 +409,7 @@ const EventVoucher = ({
422409
) : (
423410
<>
424411
Get ticket
425-
<SquareArrowOutUpRight size={16} />
412+
<SquareArrowOutUpRight size={15} />
426413
</>
427414
)}
428415
</VoxelButton>
@@ -457,9 +444,16 @@ const EventVoucher = ({
457444
>
458445
Buy Devconnect ticket <SquareArrowOutUpRight size={16} />
459446
</VoxelButton>
460-
<div className="text-xs font-semibold text-gray-600 mt-1">
461-
If you already have a Devconnect ticket, make sure to connect with
462-
the exact email you used to purchase your ticket.
447+
<div className="text-[11px] text-[#4B4B66] mt-1">
448+
If you have a Devconnect ticket, connect to Zupass using the same
449+
email used to purchase your ticket. Still having issues? Reach out
450+
to us at{" "}
451+
<a
452+
href="mailto:support@devconnect.org"
453+
className="underline text-teal-800"
454+
>
455+
support@devconnect.org
456+
</a>
463457
</div>
464458
</>
465459
)}

lib/components/voxel-button/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const Button = ({ color, fill, disabled, fat, ...props }: any) => {
88
// TODO: add more colors
99
if (color === "blue-1") return defaultColor;
1010
if (color === "green-1")
11-
return "border-[#195a20] bg-[#16a34a] text-white hover:bg-[rgba(34,197,94,1)]";
11+
return "border-[#0D5424] bg-[#127331] text-white hover:bg-[#127331]";
1212
if (color === "red-1")
1313
return "border-[#991b1b] bg-[#dc2626] text-white hover:bg-[rgba(239,68,68,1)]";
1414
if (color === "white-1")

0 commit comments

Comments
 (0)