diff --git a/src/common/NavBar/NotificationsMenu/NotificationsList/NotificationsList.js b/src/common/NavBar/NotificationsMenu/NotificationsList/NotificationsList.js
index b2d4f9d3c..067c3fd15 100644
--- a/src/common/NavBar/NotificationsMenu/NotificationsList/NotificationsList.js
+++ b/src/common/NavBar/NotificationsMenu/NotificationsList/NotificationsList.js
@@ -3,46 +3,67 @@ const PropTypes = require('prop-types');
const classnames = require('classnames');
const Icon = require('stremio-icons/dom');
const Notification = require('./Notification');
-const useMetaItems = require('./useMetaItems');
+const NotificationPlaceholder = require('./NotificationPlaceholder');
const styles = require('./styles');
const NotificationsList = ({ className, metaItems }) => {
- const notifications = useMetaItems(metaItems);
return (
{
- notifications.length > 0 ?
- notifications.map((notification) => (
- notification.videos.length === 1 ?
-
- :
-
- ))
- :
-
-
-
-
- No new notifications
-
-
-
+ metaItems.map(({ req, content }, index) => {
+ switch (content.type) {
+ case 'Ready':
+ return (
+ content.content.length > 0 ?
+ content.content.map((notification) => {
+ //notifications videos are not available in useCatalogs, but in useNotifications hook
+ notification.videos = notification.videos || [{
+ thumbnail: 'https://www.stremio.com/website/home-testimonials.jpg',
+ season: 1,
+ episode: 1,
+ released: new Date()
+ }];
+
+ return (
+ notification.videos.length === 1 ?
+
+ :
+
+ );
+ })
+ :
+
+
+
+
No new notifications
+
+
+ );
+ case 'Loading':
+ return (
+
+ );
+ }
+ })
}
);
@@ -50,7 +71,7 @@ const NotificationsList = ({ className, metaItems }) => {
NotificationsList.propTypes = {
className: PropTypes.string,
- metaItems: PropTypes.object
+ metaItems: PropTypes.arrayOf(PropTypes.object)
};
module.exports = NotificationsList;