template
This commit is contained in:
parent
84544e1153
commit
a109df2deb
7 changed files with 51 additions and 11 deletions
|
|
@ -137,7 +137,9 @@ export function CustomerWhatsAppInbox({ account, onBack }: { account: WhatsAppAc
|
|||
useEffect(() => {
|
||||
Promise.all([
|
||||
whatsappApi.messages(account.id),
|
||||
whatsappApi.templates(account.id).catch(() => ({ available: false, templates: [] as WhatsAppTemplateRow[] })),
|
||||
account.status === 'disconnected'
|
||||
? Promise.resolve({ available: false, templates: [] as WhatsAppTemplateRow[] })
|
||||
: whatsappApi.templates(account.id).catch(() => ({ available: false, templates: [] as WhatsAppTemplateRow[] })),
|
||||
])
|
||||
.then(([items, templatePayload]) => {
|
||||
setMessages(items)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue