This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

fix

+44 -36
+21 -17
src/app/api/bluesky/stats/route.ts
··· 238 238 return year >= 2025; 239 239 }); 240 240 241 - // Get the earliest and latest dates to ensure all months are included 241 + // Initialize all months from Jan 2025 to current month (or Dec 2025 if in future years) 242 + const now = new Date(); 243 + const currentYear = now.getFullYear(); 244 + const currentMonthNum = now.getMonth(); // 0-11 245 + 246 + // Start from January 2025 247 + const startMonth = new Date(2025, 0, 1); 248 + 249 + // End at current month if we're in 2025, otherwise go to Dec 2025 250 + const endMonth = currentYear === 2025 251 + ? new Date(currentYear, currentMonthNum, 1) 252 + : new Date(2025, 11, 1); // December 2025 253 + 254 + let currentMonth = new Date(startMonth); 255 + while (currentMonth <= endMonth) { 256 + const monthKey = `${currentMonth.getFullYear()}-${String(currentMonth.getMonth() + 1).padStart(2, '0')}`; 257 + monthlyCounts.set(monthKey, 0); 258 + currentMonth.setMonth(currentMonth.getMonth() + 1); 259 + } 260 + 261 + // Process each entry to get monthly counts 242 262 if (data2025Plus && data2025Plus.length > 0) { 243 - const dates = data2025Plus.map(e => new Date(e.created_at)); 244 - const minDate = new Date(Math.min(...dates.map(d => d.getTime()))); 245 - const maxDate = new Date(Math.max(...dates.map(d => d.getTime()))); 246 - 247 - // Initialize all months with 0 (starting from Jan 2025 or the earliest date) 248 - const startMonth = new Date(Math.max(minDate.getTime(), new Date(2025, 0, 1).getTime())); 249 - const currentMonth = new Date(startMonth.getFullYear(), startMonth.getMonth(), 1); 250 - const endMonth = new Date(maxDate.getFullYear(), maxDate.getMonth(), 1); 251 - 252 - while (currentMonth <= endMonth) { 253 - const monthKey = `${currentMonth.getFullYear()}-${String(currentMonth.getMonth() + 1).padStart(2, '0')}`; 254 - monthlyCounts.set(monthKey, 0); 255 - currentMonth.setMonth(currentMonth.getMonth() + 1); 256 - } 257 - 258 - // Process each entry to get monthly counts 259 263 data2025Plus.forEach(entry => { 260 264 const date = new Date(entry.created_at); 261 265 const monthKey = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}`;
+23 -19
src/app/profile/[handle]/page.tsx
··· 379 379 return year >= 2025; 380 380 }); 381 381 382 + // Initialize all months from Jan 2025 to current month (or Dec 2025 if in future years) 383 + const now = new Date(); 384 + const currentYear = now.getFullYear(); 385 + const currentMonthNum = now.getMonth(); // 0-11 386 + 387 + // Start from January 2025 388 + const startMonth = new Date(2025, 0, 1); 389 + 390 + // End at current month if we're in 2025, otherwise go to Dec 2025 391 + const endMonth = currentYear === 2025 392 + ? new Date(currentYear, currentMonthNum, 1) 393 + : new Date(2025, 11, 1); // December 2025 394 + 395 + let currentMonth = new Date(startMonth); 396 + while (currentMonth <= endMonth) { 397 + const monthKey = `${currentMonth.getFullYear()}-${String(currentMonth.getMonth() + 1).padStart(2, '0')}`; 398 + chartDataMap.set(monthKey, 0); 399 + currentMonth.setMonth(currentMonth.getMonth() + 1); 400 + } 401 + 402 + // Group entries by month 382 403 if (entries2025Plus.length > 0) { 383 - // Get the earliest and latest dates from 2025+ entries 384 - const dates = entries2025Plus.map(e => new Date(e.created_at)); 385 - const minDate = new Date(Math.min(...dates.map(d => d.getTime()))); 386 - const maxDate = new Date(Math.max(...dates.map(d => d.getTime()))); 387 - 388 - // Initialize all months with 0 (starting from Jan 2025 or the earliest date) 389 - const startMonth = new Date(Math.max(minDate.getTime(), new Date(2025, 0, 1).getTime())); 390 - const currentMonth = new Date(startMonth.getFullYear(), startMonth.getMonth(), 1); 391 - const endMonth = new Date(maxDate.getFullYear(), maxDate.getMonth(), 1); 392 - 393 - while (currentMonth <= endMonth) { 394 - const monthKey = `${currentMonth.getFullYear()}-${String(currentMonth.getMonth() + 1).padStart(2, '0')}`; 395 - chartDataMap.set(monthKey, 0); 396 - currentMonth.setMonth(currentMonth.getMonth() + 1); 397 - } 398 - 399 - // Group entries by month 400 404 entries2025Plus.forEach((entry: FlushingEntry) => { 401 405 const date = new Date(entry.created_at); 402 406 const monthKey = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}`; ··· 578 582 </div> 579 583 580 584 <div className={styles.wrappedCard}> 581 - <div className={styles.wrappedValue}>{wrapped2025Data.activeStreak}</div> 585 + <div className={styles.wrappedValue}>{wrapped2025Data.activeStreak} days</div> 582 586 <div className={styles.wrappedLabel}>Longest Streak</div> 583 587 </div> 584 588 ··· 588 592 </div> 589 593 590 594 <div className={styles.wrappedCard}> 591 - <div className={styles.wrappedValue}>{wrapped2025Data.avgStatusLength}</div> 595 + <div className={styles.wrappedValue}>{wrapped2025Data.avgStatusLength}/59</div> 592 596 <div className={styles.wrappedLabel}>Avg. Characters</div> 593 597 </div> 594 598