Skip to content

Commit

Permalink
Merge pull request #199 from gbagretsov/show-rating-with-two-digits-a…
Browse files Browse the repository at this point in the history
…fter-decimal-point

Show rating with two digits after decimal point
  • Loading branch information
gbagretsov authored Apr 22, 2024
2 parents f512bd3 + e94b643 commit 50d9278
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/memes/outputters/memes-statistics-outputter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const memesStatisticsOutputter: Outputter<MemesStatistics> = {
const author = await vk.getUserInfo(meme.author_id) as VkUser;
const dateLine = `${monthNomCase} ${year}`;
const authorInfo = `${author.first_name} ${author.last_name}`;
const ratingInfo = `${meme.rating.toFixed(1)}`; // TODO: поменять на 2
// Посмотрим, будет ли понятно через пару лет, почему у меня бомбило с этого бага и зачем здесь нужен replace
const ratingInfo = `${meme.rating.toFixed(2).replace('.', '.\u{2060}')}`;

topMemesText += `${i + 1} место — ${authorInfo}, средний балл ${ratingInfo}\n`;

Expand Down

0 comments on commit 50d9278

Please sign in to comment.