Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: notifications toggle #466

Merged
merged 14 commits into from
Dec 5, 2023
Merged

feat: notifications toggle #466

merged 14 commits into from
Dec 5, 2023

Conversation

lauti7
Copy link
Contributor

@lauti7 lauti7 commented Nov 30, 2023

No description provided.

src/components/Notifications/NotificationItem.tsx Outdated Show resolved Hide resolved
src/components/Notifications/NotificationItem.tsx Outdated Show resolved Hide resolved
src/components/Notifications/NotificationItemImage.tsx Outdated Show resolved Hide resolved
src/components/Notifications/NotificationItemImage.tsx Outdated Show resolved Hide resolved
Comment on lines +13 to +17
const i18N = {
en: { description: 'You just sold ', title: 'Item Sold' },
es: { description: 'Vendiste ', title: 'Item vendido' },
zh: { description: '你剛剛賣了 ', title: '已售商品' }
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can put this into a global translation file

Suggested change
const i18N = {
en: { description: 'You just sold ', title: 'Item Sold' },
es: { description: 'Vendiste ', title: 'Item vendido' },
zh: { description: '你剛剛賣了 ', title: '已售商品' }
}
const i18N = {
ItemSoldNotification: {
en: { description: 'You just sold ', title: 'Item Sold' },
es: { description: 'Vendiste ', title: 'Item vendido' },
zh: { description: '你剛剛賣了 ', title: '已售商品' }
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this particular case, I prefer to keep each i18N in each component file. I find it more comfortable and cleaner

src/components/Notifications/NotificationsFeed.tsx Outdated Show resolved Hide resolved
src/components/Notifications/NotificationsFeed.tsx Outdated Show resolved Hide resolved
</div>
)}
{!userNotifications.length && (
<div className="dcl notifications-feed__emptyview">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you use the before suggestion change from emptyview to empty-view then this should be

Suggested change
<div className="dcl notifications-feed__emptyview">
<div className="dcl notifications-feed__empty-view">

Copy link
Contributor Author

@lauti7 lauti7 Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kept it all as notifications-feed__emptyview-*

src/components/Notifications/NotificationsFeed.tsx Outdated Show resolved Hide resolved
src/components/Notifications/NotificationsFeed.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@braianj braianj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

@lauti7 lauti7 merged commit cb32cb3 into master Dec 5, 2023
4 checks passed
@lauti7 lauti7 deleted the feat/notifications-toggle branch December 5, 2023 16:45
Copy link

github-actions bot commented Dec 5, 2023

🎉 This PR is included in version 4.30.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants