fix: cta.platforms is an array

This commit is contained in:
thecodrr
2021-06-30 10:34:32 +05:00
parent 00ae29bd18
commit edc60c3ba8

View File

@@ -54,7 +54,11 @@ function Announcements({ announcements, removeAnnouncement }) {
)}
<Flex justifyContent="space-evenly" mt={1}>
{announcement.callToActions
?.filter((cta) => allowedPlatforms.indexOf(cta.platform) > -1)
?.filter((cta) =>
cta.platforms.some(
(platform) => allowedPlatforms.indexOf(platform) > -1
)
)
.map((action, index) => (
<Button
flex={1}