mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Updated for special SMS handling
This commit is contained in:
1 parent
3f0e60d0c2
commit
6edea22cc4
1 file changed
+2
-1
@@ -12,10 +12,11 @@
|
||||
const createMessage = (providerText:string) => {
|
||||
const vowels = ['a', 'e', 'i', 'o', 'u'];
|
||||
const firstLetter = providerText.toLowerCase().charAt(0);
|
||||
const lastLetter = providerText.charAt(providerText.length - 1);
|
||||
const lastLetter = providerText.toLowerCase().charAt(providerText.length - 1);
|
||||
let article = vowels.includes(firstLetter) ? 'an' : 'a';
|
||||
article = lastLetter === 's' ? '' : article;
|
||||
|
||||
providerText = providerText.toLowerCase() === 'sms' ? 'SMS messages' : providerText;
|
||||
return `Create ${article} ${providerText} that will be displayed to your subscribers. Learn more in our documentation.`;
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user