counters.tsx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import React from 'react';
  2. import { FormattedMessage } from 'react-intl';
  3. export const StatusesCounter = (
  4. displayNumber: React.ReactNode,
  5. pluralReady: number,
  6. ) => (
  7. <FormattedMessage
  8. id='account.statuses_counter'
  9. defaultMessage='{count, plural, one {{counter} Post} other {{counter} Posts}}'
  10. values={{
  11. count: pluralReady,
  12. counter: <strong>{displayNumber}</strong>,
  13. }}
  14. />
  15. );
  16. export const FollowingCounter = (
  17. displayNumber: React.ReactNode,
  18. pluralReady: number,
  19. ) => (
  20. <FormattedMessage
  21. id='account.following_counter'
  22. defaultMessage='{count, plural, one {{counter} Following} other {{counter} Following}}'
  23. values={{
  24. count: pluralReady,
  25. counter: <strong>{displayNumber}</strong>,
  26. }}
  27. />
  28. );
  29. export const FollowersCounter = (
  30. displayNumber: React.ReactNode,
  31. pluralReady: number,
  32. ) => (
  33. <FormattedMessage
  34. id='account.followers_counter'
  35. defaultMessage='{count, plural, one {{counter} Follower} other {{counter} Followers}}'
  36. values={{
  37. count: pluralReady,
  38. counter: <strong>{displayNumber}</strong>,
  39. }}
  40. />
  41. );