Skip to content

Commit 2709a6f

Browse files
committed
fixes
1 parent 638191a commit 2709a6f

File tree

16 files changed

+23
-47
lines changed

16 files changed

+23
-47
lines changed

app/admin/project-requests/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
CardDescription,
1010
CardHeader,
1111
CardTitle,
12-
CardFooter,
1312
} from "@/components/ui/card";
1413
import { Button } from '@/components/ui/button';
1514
import { Badge } from '@/components/ui/badge';
@@ -395,7 +394,7 @@ const AdminProjectRequestsPage = () => {
395394
<Shield className="h-16 w-16 text-red-400 mx-auto mb-4" />
396395
<h1 className="text-2xl font-bold text-white mb-2">Access Denied</h1>
397396
<p className="text-gray-400 mb-6">
398-
You don't have permission to view this page.
397+
You don&apos;t have permission to view this page.
399398
</p>
400399
{error && (
401400
<Alert className="bg-red-500/20 border-red-500 mb-4">

app/api/comments/route.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export async function POST(request: Request) {
199199

200200
// Check for recent comments to prevent spam (more lenient)
201201
const fiveMinutesAgo = new Date(Date.now() - 5 * 60 * 1000);
202-
const { data: recentComments, error: recentError } = await supabase
202+
const { data: recentComments } = await supabase
203203
.from('comments')
204204
.select('id')
205205
.eq('user_id', sanitizedUserId)
@@ -213,7 +213,7 @@ export async function POST(request: Request) {
213213
}
214214

215215
// Check for duplicate comments
216-
const { data: duplicateComment, error: duplicateError } = await supabase
216+
const { data: duplicateComment } = await supabase
217217
.from('comments')
218218
.select('id')
219219
.eq('user_id', sanitizedUserId)

app/api/project-requests/route.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const verifyAdminAccess = async (request: any): Promise<{
4747
return { isValid: false };
4848
}
4949

50-
const token = authHeader.substring(7);
50+
5151
// For legacy users with actual tokens, you'd verify the JWT here
5252
// For now, we'll return false to force admin token usage
5353
return { isValid: false };
@@ -129,7 +129,7 @@ export async function POST(request: Request) {
129129
}
130130

131131
// Check for duplicate submissions
132-
const { data: existingRequest, error: duplicateError } = await supabase
132+
const { data: existingRequest } = await supabase
133133
.from('project_requests')
134134
.select('id')
135135
.eq('user_id', sanitizedUserId)
@@ -145,7 +145,7 @@ export async function POST(request: Request) {
145145

146146
// Check recent submissions to prevent spam
147147
const oneHourAgo = new Date(Date.now() - 60 * 60 * 1000);
148-
const { data: recentRequests, error: recentError } = await supabase
148+
const { data: recentRequests } = await supabase
149149
.from('project_requests')
150150
.select('id')
151151
.eq('user_id', sanitizedUserId)

app/api/projects/update/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export async function GET() {
4646
const yesterday = new Date();
4747
yesterday.setDate(yesterday.getDate() - 1);
4848

49-
const { count: needsUpdateCount, error: projectError } = await supabase
49+
const { count: needsUpdateCount } = await supabase
5050
.from('projects')
5151
.select('*', { count: 'exact', head: true })
5252
.or(`last_updated.is.null,last_updated.lt.${yesterday.toISOString()}`);

app/api/users/route.tsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@ interface Badge {
2525
points: number;
2626
}
2727

28-
interface BadgeResponse {
29-
earnedBadges: Badge[];
30-
levelUp: boolean;
31-
currentLevel: number;
32-
currentPoints: number;
33-
}
28+
3429

3530
// Input validation helpers
3631
const validateEmail = (email: string): boolean => {
@@ -68,14 +63,6 @@ const generateSalt = (): string => {
6863
return crypto.randomBytes(32).toString("hex");
6964
};
7065

71-
// Verify user session/token (simplified - in production use JWT)
72-
const verifyUserSession = async (userId: string, token?: string): Promise<boolean> => {
73-
// This is a simplified check - implement proper session management
74-
if (!userId || !token) return false;
75-
76-
// In production, verify the token against stored sessions
77-
return true;
78-
};
7966

8067
// GET: Retrieve users (with proper authorization)
8168
export async function GET(request: Request) {

app/auth/callback/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function AuthCallbackPage() {
2828
<div className="text-center">
2929
<div className="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-purple-500 mx-auto mb-4"></div>
3030
<h1 className="text-2xl text-white font-medium">Completing sign in...</h1>
31-
<p className="text-gray-400 mt-2">You'll be redirected in a moment.</p>
31+
<p className="text-gray-400 mt-2">You&apos;ll be redirected in a moment.</p>
3232
</div>
3333
</div>
3434
);

app/profile/page.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ import {
2121
Award,
2222
Star,
2323
MessageSquare,
24-
TrendingUp,
2524
User,
26-
Mail,
27-
Camera,
2825
Settings,
2926
FileText,
3027
} from "lucide-react";

app/request/requestpage.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const handleFinalSubmit = async () => {
107107
throw new Error(errorData.error || "Failed to submit request");
108108
}
109109

110-
const data = await response.json();
110+
111111

112112
setSubmissionStatus({
113113
status: "success",
@@ -192,7 +192,7 @@ const handleFinalSubmit = async () => {
192192
</div>
193193
<div className="flex items-start gap-2">
194194
<Check className="text-green-500 mt-1 shrink-0" />
195-
<p>Include detailed descriptions to help others understand the project's value</p>
195+
<p>Include detailed descriptions to help others understand the project&apos;s value</p>
196196
</div>
197197
<div className="flex items-start gap-2">
198198
<Check className="text-green-500 mt-1 shrink-0" />
@@ -205,7 +205,7 @@ const handleFinalSubmit = async () => {
205205
<ul className="space-y-3">
206206
<li className="flex items-start gap-2">
207207
<Check className="text-green-500 mt-1 shrink-0" />
208-
<p>Clear description of the project's purpose and benefits</p>
208+
<p>Clear description of the project&apos;s purpose and benefits</p>
209209
</li>
210210
<li className="flex items-start gap-2">
211211
<Check className="text-green-500 mt-1 shrink-0" />
@@ -227,15 +227,15 @@ const handleFinalSubmit = async () => {
227227
<Star className="text-yellow-400" />
228228
Earn Rewards!
229229
</h3>
230-
<p className="text-gray-300">When your project suggestion is accepted, you'll earn:</p>
230+
<p className="text-gray-300">When your project suggestion is accepted, you&apos;ll earn:</p>
231231
<ul className="mt-2 space-y-1">
232232
<li className="flex items-center gap-2">
233233
<Check className="text-green-500 h-4 w-4" />
234234
<span>50 points to level up</span>
235235
</li>
236236
<li className="flex items-center gap-2">
237237
<Check className="text-green-500 h-4 w-4" />
238-
<span>The "Explorer" badge</span>
238+
<span>The &quot;Explorer&quot; badge</span>
239239
</li>
240240
<li className="flex items-center gap-2">
241241
<Check className="text-green-500 h-4 w-4" />
@@ -337,7 +337,7 @@ const handleFinalSubmit = async () => {
337337
</AlertDialogTitle>
338338
<AlertDialogDescription className="text-gray-300 space-y-4">
339339
<p>
340-
Don't miss updates about your submission! Join our vibrant Discord community to:
340+
Don&apos;t miss updates about your submission! Join our vibrant Discord community to:
341341
</p>
342342
<ul className="space-y-2">
343343
<li className="flex items-start gap-2">

app/saved/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ export default function SavedPage() {
136136
const { removeProject, savedProjects, isLoading } = useSaved();
137137
const { isAuthenticated } = useAuth();
138138
const [savedProjectDetails, setSavedProjectDetails] = useState<Project[]>([]);
139-
const [showWarning, setShowWarning] = useState<boolean>(true);
140139
const [error, setError] = useState<string | null>(null);
141140
const [showAuthDialog, setShowAuthDialog] = useState<boolean>(false);
142141

components/AdminUpdaterDashboard.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
CheckCircle,
1818
Loader2,
1919
PlayCircle,
20-
PauseCircle
2120
} from "lucide-react";
2221
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
2322

0 commit comments

Comments
 (0)