Created
February 11, 2020 10:32
-
-
Save mi6gan/aa446ff3bdb810df11074de2ba7a6575 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
notifications.map(({ id, verb, data }) => | |
verb === "category_weak" ? ( | |
<NotificationsStatItem | |
key={id} | |
id={id} | |
title={composeCategoryWeak(data)} | |
recommendation={"Focus on your weak..."} | |
level={"error"} | |
/> | |
) : verb === "common_mistake" ? ( | |
<NotificationsStatItem | |
key={id} | |
id={id} | |
title={composeCommonMistake(data)} | |
recommendation={"Focus on your weak..."} | |
level={"error"} | |
/> | |
) : verb === "time_long" ? ( | |
<NotificationShopItem | |
key={id} | |
id={id} | |
title={"You often solve tasks correctly, but too long."} | |
recommendation={"Speed up your pace to keep within the real test time!"} | |
leve={"error"} | |
/> | |
) : verb === "package_expiring" ? ( | |
<NotificationsStatItem | |
key={id} | |
id={id} | |
title={"Your access to the package will expire soon!"} | |
recommendation={"Focus on your weak..."} | |
level={"error"} | |
/> | |
) : ... // итд, можно писать всё в той же очередности, что в это dictionary | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment