Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/api/local-coding/stats/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function GET(req: NextRequest) {

const { searchParams } = new URL(req.url);
const rawDays = parseInt(searchParams.get("days") || "30", 10);
const days = validateDays(isNaN(rawDays) ? DEFAULT_DAYS : rawDays);
const days = validateDays(Number.isNaN(rawDays) ? DEFAULT_DAYS : rawDays);
const fromDate = new Date();
fromDate.setDate(fromDate.getDate() - days);
const fromDateStr = fromDate.toISOString().slice(0, 10);
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/metrics/repo-analytics/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export async function GET(req: NextRequest) {
} else if (activityRes.ok) {
const activityData = await activityRes.json();
if (Array.isArray(activityData) && activityData.length > 0) {
const lastWeek = activityData[activityData.length - 1];
const lastWeek = activityData.at(-1);
const days: number[] = lastWeek.days || [];
// `lastWeek.week` is a Unix timestamp (seconds) for the Sunday that starts the bucket.
// Derive labels from it so they always match the actual calendar days GitHub recorded.
Expand Down
2 changes: 2 additions & 0 deletions src/app/u/[username]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -710,3 +710,5 @@
</div>
);
}

.catch(err => console.error("Promise.all failed:", err));

Check failure on line 714 in src/app/u/[username]/page.tsx

View workflow job for this annotation

GitHub Actions / Type check

';' expected.

Check failure on line 714 in src/app/u/[username]/page.tsx

View workflow job for this annotation

GitHub Actions / Type check

')' expected.

Check failure on line 714 in src/app/u/[username]/page.tsx

View workflow job for this annotation

GitHub Actions / Type check

'try' expected.

Check failure on line 714 in src/app/u/[username]/page.tsx

View workflow job for this annotation

GitHub Actions / Type check

Declaration or statement expected.
Loading