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.

address final feedback

Steven Teydafca4f6fe66
diff --git a/apps/web/ui/partners/rewards/add-edit-reward-sheet.tsx b/apps/web/ui/partners/rewards/add-edit-reward-sheet.tsx
index 6434e7a892..5474752415 100644
--- a/apps/web/ui/partners/rewards/add-edit-reward-sheet.tsx
+++ b/apps/web/ui/partners/rewards/add-edit-reward-sheet.tsx
@@ -103,21 +103,23 @@ function RewardSheetContent({
const { handleSubmit, watch, getValues, setValue, setError } = form;
const [
+ selectedEvent,
amount,
type,
maxDuration,
+ modifiers,
includedPartnerIds = [],
excludedPartnerIds = [],
] = watch([
+ "event",
"amount",
"type",
"maxDuration",
+ "modifiers",
"includedPartnerIds",
"excludedPartnerIds",
]);
- const selectedEvent = watch("event");
-
const { data: rewardPartners, loading: isLoadingRewardPartners } =
useRewardPartners({
query: {
@@ -187,12 +189,12 @@ function RewardSheetContent({
useEffect(() => {
if (
- getValues("modifiers")?.length > 0 &&
+ modifiers?.length > 0 &&
!getPlanCapabilities(plan).canUseAdvancedRewardLogic
) {
setShowAdvancedUpsell(true);
}
- }, [getValues("modifiers"), plan]);
+ }, [modifiers, plan]);
const onSubmit = async (data: FormData) => {
if (!workspaceId || !defaultProgramId || showAdvancedUpsell) {