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

fix display of empty topics message #638

Conversation

petrjasek
Copy link
Member

so it's visible based on selected my/company topics.

CPCN-415

Checklist

  • This pull request is not adding new forms that use redux
  • This pull request is adding missing TypeScript types to modified code segments where it's easy to do so with confidence

so it's visible based on selected my/company topics.

CPCN-415
@petrjasek petrjasek added this to the v2.5 milestone Oct 26, 2023
@@ -259,7 +261,7 @@ class PersonalizeHomeModal extends React.Component<IProps, IState> {
{
gettext(
'{{size}} out of 6 topics selected',
{size: this.state.selectedTopicIds.length}
{size: this.state.selectedTopicIds.length || '0'}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it'd be better if you used ??

Copy link
Contributor

Choose a reason for hiding this comment

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

Also since length is a number why is the fallback a string?

Copy link
Member Author

Choose a reason for hiding this comment

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

found the problem why it didn't work, it was in the gettext

@petrjasek petrjasek merged commit 1cf903a into superdesk:release/2.5 Oct 26, 2023
7 checks passed
@petrjasek petrjasek deleted the fix-personalize-modal-no-topics-handling branch October 26, 2023 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants