Skip to content

Commit

Permalink
Hide button for surveys with no countries
Browse files Browse the repository at this point in the history
  • Loading branch information
alexd-bes committed Jul 23, 2024
1 parent 2d7b687 commit 32c2bf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/admin-panel/src/routes/surveys/surveys.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ const SURVEY_COLUMNS = [
actionConfig: {
generateUrl: row => {
const { code, countryCodes } = row;
if (!countryCodes || countryCodes.length === 0) return null;
if (!countryCodes || !countryCodes.some(countryCode => !!countryCode)) return null;
const countryCodeToUse = countryCodes.includes('DL') ? 'DL' : countryCodes[0];
return `${REACT_APP_DATATRAK_WEB_URL}/survey/${countryCodeToUse}/${code}/1`;
},
Expand Down

0 comments on commit 32c2bf0

Please sign in to comment.