-
-
- }
- {...shouldLockDisableProps("hashedLink")}
- description={t("private_link_description", { appName: APP_NAME })}
- checked={hashedLinkVisible}
- onCheckedChange={(e) => {
- formMethods.setValue("hashedLink", e ? hashedUrl : undefined, { shouldDirty: true });
- setHashedLinkVisible(e);
- }}>
- {!isManagedEventType && (
-
- {!IS_VISUAL_REGRESSION_TESTING && (
-
-
-
+ {
+ return (
+ {
+ if (!e) {
+ formMethods.setValue("multiplePrivateLinks", [], { shouldDirty: true });
+ } else {
+ formMethods.setValue(
+ "multiplePrivateLinks",
+ [generateHashedLink(formMethods.getValues("users")[0]?.id ?? team?.id)],
+ { shouldDirty: true }
+ );
}
- />
- )}
-
- )}
-
+ setMultiplePrivateLinksVisible(e);
+ }}>
+ {!isManagedEventType && (
+