Merge pull request #62 from JaiSharma1710/bugfix/61-default-item-incase-of-empty-label-list

#61 Added default item in case of empty list in labels dropdown in subscriber section
This commit is contained in:
Mohamed Marrouchi 2024-09-22 11:46:52 +01:00 committed by GitHub
commit 7115426432
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 7 deletions

View File

@ -206,11 +206,15 @@ export const Subscribers = () => {
),
}}
>
{(labels || []).map((label) => (
<MenuItem key={label.id} value={label.id}>
{label.name}
</MenuItem>
))}
{!!labels.length ? (
labels.map((label) => (
<MenuItem key={label.id} value={label.id}>
{label.name}
</MenuItem>
))
) : (
<MenuItem disabled>{t("message.no_label_found")}</MenuItem>
)}
</Input>
</Grid>
</PageHeader>

View File

@ -99,7 +99,8 @@
"invalid_max_fallback_attempt_limit": "Max fallback attempt limit must have positive value",
"regex_is_invalid": "Regex is invalid",
"attachment_not_found": "Attachment is not found",
"title_length_exceeded": "You have reached the maximum length"
"title_length_exceeded": "You have reached the maximum length",
"no_label_found": "No label found"
},
"menu": {
"terms": "Terms of Use",

View File

@ -100,7 +100,8 @@
"invalid_max_fallback_attempt_limit": "La limite des tentatives de secours doit être un nombre positif.",
"regex_is_invalid": "Le regex est invalide",
"attachment_not_found": "La pièce jointe est introuvable",
"title_length_exceeded": "Vous avez atteint la longueur maximale"
"title_length_exceeded": "Vous avez atteint la longueur maximale",
"no_label_found": "Aucune étiquette trouvée"
},
"menu": {
"terms": "Conditions d'utilisation",