fix: render copy link button based on single use survey (#6288)

This commit is contained in:
om pharate
2025-07-22 22:01:54 +05:30
committed by GitHub
parent cb68d9defc
commit ebe50a4821

View File

@@ -219,16 +219,18 @@ export const SurveyDropDownMenu = ({
{t("common.preview_survey")}
</button>
</DropdownMenuItem>
<DropdownMenuItem>
<button
type="button"
data-testid="copy-link"
className="flex w-full items-center"
onClick={async (e) => handleCopyLink(e)}>
<LinkIcon className="mr-2 h-4 w-4" />
{t("common.copy_link")}
</button>
</DropdownMenuItem>
{!survey.singleUse?.enabled && (
<DropdownMenuItem>
<button
type="button"
data-testid="copy-link"
className="flex w-full items-center"
onClick={async (e) => handleCopyLink(e)}>
<LinkIcon className="mr-2 h-4 w-4" />
{t("common.copy_link")}
</button>
</DropdownMenuItem>
)}
</>
)}
{!isSurveyCreationDeletionDisabled && (