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

Feature/post submit time #5

Merged
merged 5 commits into from
Oct 13, 2020
Merged

Feature/post submit time #5

merged 5 commits into from
Oct 13, 2020

Conversation

matteoauger
Copy link
Contributor

@matteoauger matteoauger commented Oct 12, 2020

Aims to close #2

I added an util function to provide the date label client-side.
This function is called on Home and SinglePost card elements, and displayed on the right side of the "like" button via display flex.
This function generates a message for each desired case:

  • Recent post (< 2mn) : "Posted a few minutes ago"

  • Post uploaded within the hour : "Posted [x] minutes ago"

  • Post uploaded within the day : "Posted [x] hour(s) ago"

  • Post uploaded within the year : "Posted [x] day(s) ago"

  • Other cases : "Posted [x] year(s) ago"

Example

Feel free to provide your feedbacks :)

PS: sorry for the code format issue on my commits 😅

@MeghalBisht MeghalBisht merged commit 1f18ffc into MeghalBisht:master Oct 13, 2020
@MeghalBisht
Copy link
Owner

Hey @matteoauger , this looks awesome! :) Thanks a lot
Will add you to the contributors list, once I create it.

@MeghalBisht MeghalBisht added hacktoberfest Hacktober fest accepted, I will merge once PR is submitted hacktoberfest-accepted Hacktober fest accepted, I will merge once PR is submitted hacktoberfest2020 Hacktober fest accepted, I will merge once PR is submitted enhancement New feature or request labels Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest Hacktober fest accepted, I will merge once PR is submitted hacktoberfest2020 Hacktober fest accepted, I will merge once PR is submitted hacktoberfest-accepted Hacktober fest accepted, I will merge once PR is submitted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the time at which the post was submitted.
2 participants