chore: linting

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-03-31 21:42:03 -07:00
parent 0201fd319d
commit 5c8769508f
11 changed files with 71 additions and 61 deletions

View file

@ -4,7 +4,14 @@ import { CircleSlash2 } from "lucide-react";
import Link from "next/link";
import { useParams } from "next/navigation";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/components/ui/card";
export default function PurchaseCancelPage() {
const params = useParams();
@ -16,7 +23,9 @@ export default function PurchaseCancelPage() {
<CardHeader className="text-center">
<CircleSlash2 className="mx-auto h-10 w-10 text-muted-foreground" />
<CardTitle className="text-2xl">Checkout canceled</CardTitle>
<CardDescription>No charge was made and your current pages are unchanged.</CardDescription>
<CardDescription>
No charge was made and your current pages are unchanged.
</CardDescription>
</CardHeader>
<CardContent className="text-center text-sm text-muted-foreground">
You can return to the pricing options and try again whenever you&apos;re ready.

View file

@ -7,7 +7,14 @@ import { useParams } from "next/navigation";
import { useEffect } from "react";
import { USER_QUERY_KEY } from "@/atoms/user/user-query.atoms";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/components/ui/card";
export default function PurchaseSuccessPage() {
const params = useParams();

View file

@ -17,9 +17,18 @@ import { stripeApiService } from "@/lib/apis/stripe-api.service";
import { cn } from "@/lib/utils";
const STATUS_STYLES: Record<PagePurchaseStatus, { label: string; className: string }> = {
completed: { label: "Completed", className: "bg-emerald-600 text-white border-transparent hover:bg-emerald-600" },
pending: { label: "Pending", className: "bg-yellow-600 text-white border-transparent hover:bg-yellow-600" },
failed: { label: "Failed", className: "bg-destructive text-white border-transparent hover:bg-destructive" },
completed: {
label: "Completed",
className: "bg-emerald-600 text-white border-transparent hover:bg-emerald-600",
},
pending: {
label: "Pending",
className: "bg-yellow-600 text-white border-transparent hover:bg-yellow-600",
},
failed: {
label: "Failed",
className: "bg-destructive text-white border-transparent hover:bg-destructive",
},
};
function formatDate(iso: string): string {
@ -82,9 +91,7 @@ export function PurchaseHistoryContent() {
const style = STATUS_STYLES[p.status];
return (
<TableRow key={p.id}>
<TableCell className="text-sm">
{formatDate(p.created_at)}
</TableCell>
<TableCell className="text-sm">{formatDate(p.created_at)}</TableCell>
<TableCell className="text-right tabular-nums text-sm">
{p.pages_granted.toLocaleString()}
</TableCell>
@ -92,9 +99,7 @@ export function PurchaseHistoryContent() {
{formatAmount(p)}
</TableCell>
<TableCell className="text-center">
<Badge className={cn("text-[10px]", style.className)}>
{style.label}
</Badge>
<Badge className={cn("text-[10px]", style.className)}>{style.label}</Badge>
</TableCell>
</TableRow>
);