Skip to content
This repository was archived by the owner on Jan 3, 2026. It is now read-only.

Commit 3d33e6c

Browse files
committed
Fix build errors
1 parent 1f320f8 commit 3d33e6c

File tree

3 files changed

+26
-27
lines changed

3 files changed

+26
-27
lines changed

src/app/api/v1.0/badge/[badgeId]/route.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,3 @@ export async function GET(
128128
});
129129
}
130130
}
131-

src/app/globals.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@
6969
}
7070

7171
@layer utilities {
72-
@reference {
73-
@import 'tailwindcss';
74-
}
75-
7672
@keyframes slideInUp {
7773
from {
7874
opacity: 0;

src/components/RateLimitUsage.tsx

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import { useEffect, useState, useCallback, useMemo } from 'react';
3+
import { useEffect, useState, useCallback } from 'react';
44
import { useAuth } from '@/lib/auth-context';
55
import { api } from '@/lib/api-client';
66
import Link from 'next/link';
@@ -55,29 +55,32 @@ export default function RateLimitUsage() {
5555
}
5656
}, [isAuthenticated, fetchRateLimitData]);
5757

58-
const getResetTimeDisplay = useCallback((resetTime: string) => {
59-
const resetDate = new Date(resetTime);
60-
const now = new Date();
61-
const diffMs = resetDate.getTime() - now.getTime();
58+
const getResetTimeDisplay = useCallback(
59+
(resetTime: string) => {
60+
const resetDate = new Date(resetTime);
61+
const now = new Date();
62+
const diffMs = resetDate.getTime() - now.getTime();
6263

63-
if (diffMs <= 0) {
64-
return t('dashboard.rateLimits.resettingNow');
65-
}
64+
if (diffMs <= 0) {
65+
return t('dashboard.rateLimits.resettingNow');
66+
}
6667

67-
const diffSeconds = Math.floor(diffMs / 1000);
68-
const diffMinutes = Math.floor(diffSeconds / 60);
69-
const diffHours = Math.floor(diffMinutes / 60);
70-
const remainingMinutes = diffMinutes % 60;
71-
const remainingSeconds = diffSeconds % 60;
68+
const diffSeconds = Math.floor(diffMs / 1000);
69+
const diffMinutes = Math.floor(diffSeconds / 60);
70+
const diffHours = Math.floor(diffMinutes / 60);
71+
const remainingMinutes = diffMinutes % 60;
72+
const remainingSeconds = diffSeconds % 60;
7273

73-
if (diffHours > 0) {
74-
return `${diffHours}h ${remainingMinutes}m`;
75-
} else if (diffMinutes > 0) {
76-
return `${diffMinutes}m ${remainingSeconds}s`;
77-
} else {
78-
return `${remainingSeconds}s`;
79-
}
80-
}, [updateTrigger, t]);
74+
if (diffHours > 0) {
75+
return `${diffHours}h ${remainingMinutes}m`;
76+
} else if (diffMinutes > 0) {
77+
return `${diffMinutes}m ${remainingSeconds}s`;
78+
} else {
79+
return `${remainingSeconds}s`;
80+
}
81+
},
82+
[updateTrigger, t]
83+
);
8184

8285
if (loading) {
8386
return (
@@ -286,7 +289,8 @@ export default function RateLimitUsage() {
286289
)}
287290
</div>
288291
<div className='text-xs text-slate-500'>
289-
{t('dashboard.rateLimits.resetsIn')} {getResetTimeDisplay(op.resetTime)}
292+
{t('dashboard.rateLimits.resetsIn')}{' '}
293+
{getResetTimeDisplay(op.resetTime)}
290294
</div>
291295
</div>
292296
</div>

0 commit comments

Comments
 (0)