Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update reject-partner-application-modal.tsx

Steven Tey3db0dbb16421
diff --git a/apps/web/ui/modals/reject-partner-application-modal.tsx b/apps/web/ui/modals/reject-partner-application-modal.tsx
index 59ba05bd80..36e09f8bc6 100644
--- a/apps/web/ui/modals/reject-partner-application-modal.tsx
+++ b/apps/web/ui/modals/reject-partner-application-modal.tsx
@@ -255,19 +255,19 @@ export function RejectPartnerApplicationModal({
Reapplication timeframe
</label>
<ToggleGroup
- className="mt-1.5 flex w-full items-center gap-1 rounded-md border border-neutral-200 bg-neutral-100 p-1"
+ className={cn(
+ "mt-1.5 flex w-full items-center gap-1 rounded-md border border-neutral-200 bg-neutral-100 p-1",
+ flagForFraud && "pointer-events-none opacity-60",
+ )}
optionClassName="h-8 flex flex-1 items-center justify-center rounded-md text-sm normal-case"
indicatorClassName="bg-white"
options={[...REAPPLICATION_TIMEFRAME_OPTIONS]}
selected={reapplicationTimeframe}
selectAction={(value) => {
- if (isPending) {
+ if (isPending || flagForFraud) {
return;
}
const timeframe = value as "instant" | "standard" | "never";
- if (timeframe === "instant" && flagForFraud) {
- return;
- }
setReapplicationTimeframe(timeframe);
if (timeframe === "instant") {
setFlagForFraud(false);
@@ -298,9 +298,7 @@ export function RejectPartnerApplicationModal({
}
fn={(checked: boolean) => {
setFlagForFraud(checked);
- if (checked) {
- setReapplicationTimeframe("standard");
- }
+ setReapplicationTimeframe(checked ? "never" : "standard");
}}
/>
</div>