feat: Allow users to see heatmap for last 30 days (#10848)

<img width="989" alt="Screenshot 2025-02-05 at 6 34 12 PM"
src="https://github.com/user-attachments/assets/ae811842-23f7-4bbc-8a42-7cbe4849d287"
/>

View heatmaps for last 30 days based on the filter.
This commit is contained in:
Pranav
2025-02-19 14:54:15 -08:00
committed by GitHub
parent 11a7414dc0
commit 0a2fd7b1f4
8 changed files with 179 additions and 91 deletions

View File

@@ -94,7 +94,8 @@ module Api::V2::Accounts::HeatmapHelper
end
def since_timestamp(date)
(date - 6.days).to_i.to_s
number_of_days = params[:days_before].present? ? params[:days_before].to_i.days : 6.days
(date - number_of_days).to_i.to_s
end
def until_timestamp(date)