Closed MattVwaves closed 1 year ago
Description
Posts made yesterday are currently not being displayed correctly
There is currently an overlap of the previous edit button container and the new edit icon
Implementation
The current date logic includes a function isYesterday which is not functioning correctly, as it always produces false
isYesterday
false
instead of using isYesterday to get the date of yesterday we can use: const yesterday = sub(new Date(), { days: 1 })
const yesterday = sub(new Date(), { days: 1 })
we can then further extract just the day from this date and check with the postDay
postDay
For the post edit button the previous container simply has to be removed
Description
Posts made yesterday are currently not being displayed correctly
There is currently an overlap of the previous edit button container and the new edit icon
Implementation
The current date logic includes a function
isYesterday
which is not functioning correctly, as it always producesfalse
instead of using
isYesterday
to get the date of yesterday we can use:const yesterday = sub(new Date(), { days: 1 })
we can then further extract just the day from this date and check with the
postDay
For the post edit button the previous container simply has to be removed