Skip to content

Commit

Permalink
✨ Add views property to Feed model and update news-container component
Browse files Browse the repository at this point in the history
  • Loading branch information
marcode24 committed Jul 17, 2024
1 parent 2472ae2 commit 37bc045
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/core/mocks/feed.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const getFeedMock = (): Feed => ({
inUser: faker.datatype.boolean(),
liked: faker.datatype.boolean(),
likes: faker.datatype.number(),
views: faker.datatype.number(),
});

export const getFeedsMock = (size = 10): Feed[] => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="details">
<p class="date"> {{ feed.pubDate | date: 'dd-MM-yyyy' }} </p>
<p class="bull">&bull;</p>
<p class="read"> {{ feed.readingTime! <= 0 ? 1 : feed.readingTime }} min read</p>
<p class="read"> {{ feed.readingTime! <= 0 || feed.readingTime === undefined ? 1 : feed.readingTime }} min read</p>
</div>
<div class="options">
<div class="option default">
Expand Down

0 comments on commit 37bc045

Please sign in to comment.