Skip to content

Commit f7b3dbc

Browse files
fix: resolve ci errors (lint, typecheck)
1 parent d47f1ca commit f7b3dbc

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

app/api/streak/route.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,14 @@ function buildErrorResponse(error: unknown, parseResult: ParseResult): NextRespo
256256
message.toLowerCase().includes('validation') ||
257257
message.toLowerCase().includes('strictly for organizations');
258258

259-
const errBg = `#${sanitizeHexColor((parseResult.success && parseResult.data.bg) || '0d1117')}`;
259+
const errBg = `#${sanitizeHexColor(parseResult.success ? parseResult.data.bg : undefined, '0d1117')}`;
260260
const errAccentRaw =
261261
(parseResult.success &&
262262
(Array.isArray(parseResult.data.accent)
263263
? parseResult.data.accent[parseResult.data.accent.length - 1]
264-
: parseResult.data.accent)) ||
265-
'58a6ff';
266-
const errAccent = `#${sanitizeHexColor(errAccentRaw)}`;
267-
const errText = `#${sanitizeHexColor((parseResult.success && parseResult.data.text) || 'c9d1d9')}`;
264+
: parseResult.data.accent)) || undefined;
265+
const errAccent = `#${sanitizeHexColor(errAccentRaw, '58a6ff')}`;
266+
const errText = `#${sanitizeHexColor(parseResult.success ? parseResult.data.text : undefined, 'c9d1d9')}`;
268267
const errRadius = parseResult.success
269268
? (() => {
270269
const r = Number(parseResult.data.radius);

app/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { Footer } from '@/app/components/Footer';
1414

1515
import { FeatureCard, FeatureCardsSection } from '@/components/FeatureCards';
1616
import { DiscordButton } from '@/components/DiscordButton';
17+
import { InteractiveViewer } from '@/components/InteractiveViewer';
1718

1819
const Icons = {
1920
Github: () => (

utils/time.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ describe('getSecondsUntilMidnightInTimezone', () => {
242242
{ tz: 'Etc/GMT-14', offset: 14, utcHour: 10, expectedLocalHour: 0 }, // UTC+14
243243
];
244244

245-
for (const { tz, utcHour, expectedLocalHour } of extremeOffsets) {
245+
for (const { tz, utcHour } of extremeOffsets) {
246246
// Set UTC time such that local time is exactly midnight
247247
vi.setSystemTime(new Date(Date.UTC(2024, 6, 15, utcHour, 0, 0)));
248248

0 commit comments

Comments
 (0)