fix: issue in the event location field (#15229)
* fix: issues in event location field * Update EventSetupTab.tsx * Update EventSetupTab.tsx * update --------- Co-authored-by: Udit Takkar <[email protected]> Co-authored-by: Somay Chauhan <[email protected]> Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
1 file changed
+7
@@ -243,6 +243,10 @@ const Locations: React.FC<LocationsProps> = ({
|
||||
eventLocationType.organizerInputType ||
|
||||
!validLocations?.find((location) => location.type === newLocationType);
|
||||
|
||||
const shouldUpdateLink =
|
||||
eventLocationType?.organizerInputType === "text" &&
|
||||
eventLocationType.defaultValueVariable === "link";
|
||||
|
||||
if (canAddLocation) {
|
||||
updateLocationField(index, {
|
||||
type: newLocationType,
|
||||
@@ -250,6 +254,9 @@ const Locations: React.FC<LocationsProps> = ({
|
||||
credentialId: e.credentialId,
|
||||
teamName: e.teamName ?? undefined,
|
||||
}),
|
||||
...(shouldUpdateLink && {
|
||||
link: "",
|
||||
}),
|
||||
});
|
||||
} else {
|
||||
updateLocationField(index, {
|
||||
|
||||
Reference in new issue
Block a user