Skip to content

Commit

Permalink
fix: location change during rescheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
dilpreetsio committed Jul 17, 2024
1 parent af3d2e6 commit 9bd23d4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ const EventTypePage = (props: EventTypeSetupProps & { allActiveWorkflows?: Workf
const [pendingRoute, setPendingRoute] = useState("");

Check warning on line 227 in apps/web/modules/event-types/views/event-types-single-view.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

apps/web/modules/event-types/views/event-types-single-view.tsx#L227

[@typescript-eslint/no-unused-vars] 'pendingRoute' is assigned a value but never used. Allowed unused elements of array destructuring patterns must match /^_/u.

Check warning on line 227 in apps/web/modules/event-types/views/event-types-single-view.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

apps/web/modules/event-types/views/event-types-single-view.tsx#L227

[@typescript-eslint/no-unused-vars] 'setPendingRoute' is assigned a value but never used. Allowed unused elements of array destructuring patterns must match /^_/u.
const leaveWithoutAssigningHosts = useRef(false);

Check warning on line 228 in apps/web/modules/event-types/views/event-types-single-view.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

apps/web/modules/event-types/views/event-types-single-view.tsx#L228

[@typescript-eslint/no-unused-vars] 'leaveWithoutAssigningHosts' is assigned a value but never used. Allowed unused vars must match /^_/u.
const [animationParentRef] = useAutoAnimate<HTMLDivElement>();

const updateMutation = trpc.viewer.eventTypes.update.useMutation({
onSuccess: async () => {
const currentValues = formMethods.getValues();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export type SelectLikeComponentProps<
}
? TVal["value"]
: TVal;
optionValue?: string;
}[];
} & CommonProps<TVal>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default function getLocationsOptionsForSelect(
label: translatedLocation || locationString,
value: type,
inputPlaceholder: t(eventLocation?.attendeeInputPlaceholder || ""),
optionValue: location?.link || location?.address || "",
};
})
.filter(notEmpty);
Expand Down
4 changes: 2 additions & 2 deletions packages/features/form-builder/Components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ export const Components: Record<FieldType, Component> = {
if (!value) {
setValue({
value: options[0]?.value,
optionValue: "",
optionValue: options[0]?.optionValue || "",
});
}
}, [options, setValue, value]);
Expand Down Expand Up @@ -429,7 +429,7 @@ export const Components: Record<FieldType, Component> = {
onChange={(e) => {
setValue({
value: e.target.value,
optionValue: "",
optionValue: option?.optionValue || "",
});
}}
checked={value?.value === option.value}
Expand Down

0 comments on commit 9bd23d4

Please sign in to comment.