refactor: eslint and prettier conflict will be resolved and formatted

This commit is contained in:
Enes Köksal
2026-04-23 17:05:43 +03:00
parent 385b61f29b
commit 3cfea40fbd
219 changed files with 16638 additions and 13663 deletions
+7 -11
View File
@@ -1,8 +1,8 @@
"use client";
'use client';
import { useEffect } from "react";
import { Button } from "@/components/ui/button";
import { AlertTriangle, Film } from "lucide-react";
import { useEffect } from 'react';
import { Button } from '@/components/ui/button';
import { AlertTriangle, Film } from 'lucide-react';
export default function WatchError({
error,
@@ -12,7 +12,7 @@ export default function WatchError({
reset: () => void;
}) {
useEffect(() => {
console.error("Watch page error:", error);
console.error('Watch page error:', error);
}, [error]);
return (
@@ -26,17 +26,13 @@ export default function WatchError({
<p className="text-muted-foreground max-w-md">
We couldn&apos;t load this video. It may have been removed or the link might be incorrect.
</p>
{error.digest && (
<p className="text-muted-foreground text-xs">
Error ID: {error.digest}
</p>
)}
{error.digest && <p className="text-muted-foreground text-xs">Error ID: {error.digest}</p>}
</div>
<div className="flex gap-2">
<Button onClick={reset} variant="default">
Try again
</Button>
<Button onClick={() => window.location.href = "/"} variant="outline">
<Button onClick={() => (window.location.href = '/')} variant="outline">
Go home
</Button>
</div>
+4 -4
View File
@@ -1,5 +1,5 @@
import { Skeleton } from "@/components/ui/skeleton"
import { Separator } from "@/components/ui/separator"
import { Skeleton } from '@/components/ui/skeleton';
import { Separator } from '@/components/ui/separator';
function CommentSkeleton() {
return (
@@ -14,7 +14,7 @@ function CommentSkeleton() {
<Skeleton className="h-4 w-full mb-1" />
<Skeleton className="h-4 w-2/3" />
</div>
)
);
}
export default function WatchLoading() {
@@ -77,5 +77,5 @@ export default function WatchLoading() {
</div>
</div>
</div>
)
);
}
+5 -4
View File
@@ -1,6 +1,6 @@
import Link from "next/link";
import { Button } from "@/components/ui/button";
import { Film, XCircle } from "lucide-react";
import Link from 'next/link';
import { Button } from '@/components/ui/button';
import { Film, XCircle } from 'lucide-react';
export default function WatchNotFound() {
return (
@@ -12,7 +12,8 @@ export default function WatchNotFound() {
</div>
<h1 className="text-2xl font-bold">Video Not Found</h1>
<p className="text-muted-foreground max-w-md">
The video you&apos;re looking for doesn&apos;t exist, has been removed, or the link may be expired.
The video you&apos;re looking for doesn&apos;t exist, has been removed, or the link may be
expired.
</p>
</div>
<div className="flex gap-2">
+4 -1
View File
@@ -83,7 +83,10 @@ export async function POST(request: NextRequest, { params }: RouteParams) {
const tokenForAttempt = shareTokenFromBody || pendingToken;
if (!tokenForAttempt) {
return NextResponse.json({ error: 'Share session expired. Open the share link again.' }, { status: 401 });
return NextResponse.json(
{ error: 'Share session expired. Open the share link again.' },
{ status: 401 }
);
}
// Additional throttle bound to token+IP to reduce password guessing against one link.