biome checks

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-10-04 12:20:28 -07:00
parent 750d828f2b
commit 811a9ad061
14 changed files with 98 additions and 104 deletions

View file

@ -1,7 +1,6 @@
"use client";
import { format } from "date-fns";
import { AnimatePresence, motion, type Variants } from "motion/react";
import {
Calendar,
CheckCircle,
@ -14,6 +13,7 @@ import {
Tag,
Trash2,
} from "lucide-react";
import { AnimatePresence, motion, type Variants } from "motion/react";
import { useRouter, useSearchParams } from "next/navigation";
import { useEffect, useState } from "react";
import { toast } from "sonner";

View file

@ -1,8 +1,8 @@
"use client";
import { format } from "date-fns";
import { motion } from "motion/react";
import { Calendar as CalendarIcon, Edit, Plus, RefreshCw, Trash2 } from "lucide-react";
import { motion } from "motion/react";
import { useParams, useRouter } from "next/navigation";
import { useEffect, useState } from "react";
import { toast } from "sonner";

View file

@ -1,7 +1,7 @@
"use client";
import { motion } from "motion/react";
import { ArrowLeft, Check, Loader2 } from "lucide-react";
import { motion } from "motion/react";
import { useParams, useRouter } from "next/navigation";
import { useEffect } from "react";
import { toast } from "sonner";

View file

@ -1,8 +1,8 @@
"use client";
import { zodResolver } from "@hookform/resolvers/zod";
import { motion } from "motion/react";
import { ArrowLeft, Check, Info, Loader2 } from "lucide-react";
import { motion } from "motion/react";
import { useParams, useRouter } from "next/navigation";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";

View file

@ -1,7 +1,7 @@
"use client";
import { AnimatePresence, motion, type Variants } from "motion/react";
import { CircleAlert, CircleX, Columns3, Filter, ListFilter, Trash } from "lucide-react";
import { AnimatePresence, motion, type Variants } from "motion/react";
import React, { useMemo, useRef } from "react";
import {
AlertDialog,

View file

@ -1,7 +1,7 @@
"use client";
import { motion } from "motion/react";
import { ChevronDown, ChevronUp, FileX } from "lucide-react";
import { motion } from "motion/react";
import React from "react";
import { DocumentViewer } from "@/components/document-viewer";
import { Button } from "@/components/ui/button";

View file

@ -1,7 +1,7 @@
"use client";
import { motion } from "motion/react";
import { ChevronFirst, ChevronLast, ChevronLeft, ChevronRight } from "lucide-react";
import { motion } from "motion/react";
import { Button } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
import { Pagination, PaginationContent, PaginationItem } from "@/components/ui/pagination";

View file

@ -42,18 +42,11 @@ export default function DocumentsTable() {
const [selectedIds, setSelectedIds] = useState<Set<number>>(new Set());
// Use server-side pagination and search
const {
documents,
total,
loading,
error,
fetchDocuments,
searchDocuments,
deleteDocument,
} = useDocuments(searchSpaceId, {
page: pageIndex,
pageSize: pageSize,
});
const { documents, total, loading, error, fetchDocuments, searchDocuments, deleteDocument } =
useDocuments(searchSpaceId, {
page: pageIndex,
pageSize: pageSize,
});
// Refetch when pagination changes or when search/filters change
useEffect(() => {
@ -172,7 +165,6 @@ export default function DocumentsTable() {
}}
/>
<PaginationControls
pageIndex={pageIndex}
pageSize={pageSize}

View file

@ -1,7 +1,7 @@
"use client";
import { AnimatePresence, motion } from "motion/react";
import { CheckCircle2, FileType, Info, Tag, Upload, X } from "lucide-react";
import { AnimatePresence, motion } from "motion/react";
import { useParams, useRouter } from "next/navigation";
import { useCallback, useState } from "react";
import { useDropzone } from "react-dropzone";

View file

@ -2,8 +2,8 @@
import { IconBrandYoutube } from "@tabler/icons-react";
import { type Tag, TagInput } from "emblor";
import { motion, type Variants } from "motion/react";
import { Loader2 } from "lucide-react";
import { motion, type Variants } from "motion/react";
import { useParams, useRouter } from "next/navigation";
import { useState } from "react";
import { toast } from "sonner";

View file

@ -15,7 +15,6 @@ import {
useReactTable,
type VisibilityState,
} from "@tanstack/react-table";
import { AnimatePresence, motion, type Variants } from "motion/react";
import {
Activity,
AlertCircle,
@ -42,6 +41,7 @@ import {
X,
Zap,
} from "lucide-react";
import { AnimatePresence, motion, type Variants } from "motion/react";
import { useParams } from "next/navigation";
import React, { useContext, useId, useMemo, useRef, useState } from "react";
import { toast } from "sonner";

View file

@ -1,8 +1,8 @@
"use client";
import { IconCheck, IconCopy, IconKey } from "@tabler/icons-react";
import { AnimatePresence, motion } from "motion/react";
import { ArrowLeft } from "lucide-react";
import { AnimatePresence, motion } from "motion/react";
import { useRouter } from "next/navigation";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";

View file

@ -1,7 +1,7 @@
"use client";
import { motion, type Variants } from "motion/react";
import { AlertCircle, Loader2, Plus, Search, Trash2 } from "lucide-react";
import { motion, type Variants } from "motion/react";
import Image from "next/image";
import Link from "next/link";
import { useRouter } from "next/navigation";

View file

@ -2,8 +2,8 @@
import NumberFlow from "@number-flow/react";
import confetti from "canvas-confetti";
import { motion } from "motion/react";
import { Check, Star } from "lucide-react";
import { motion } from "motion/react";
import Link from "next/link";
import { useRef, useState } from "react";
import { buttonVariants } from "@/components/ui/button";
@ -91,53 +91,55 @@ export function Pricing({
</span>
</div>
<div className={cn(
"grid grid-cols-1 gap-4",
plans.length === 2 ? "md:grid-cols-2 max-w-5xl mx-auto" : "md:grid-cols-3"
)}>
{plans.map((plan, index) => (
<motion.div
key={index}
initial={{ y: 50, opacity: 1 }}
whileInView={
isDesktop
? plans.length === 2
? {
y: plan.isPopular ? -20 : 0,
opacity: 1,
scale: plan.isPopular ? 1.0 : 0.96,
}
: {
y: plan.isPopular ? -20 : 0,
opacity: 1,
x: index === 2 ? -30 : index === 0 ? 30 : 0,
scale: index === 0 || index === 2 ? 0.94 : 1.0,
}
: {}
}
viewport={{ once: true }}
transition={{
duration: 1.6,
type: "spring",
stiffness: 100,
damping: 30,
delay: 0.4,
opacity: { duration: 0.5 },
}}
className={cn(
`rounded-2xl border-[1px] p-6 bg-background text-center lg:flex lg:flex-col lg:justify-center relative`,
plan.isPopular ? "border-primary border-2" : "border-border",
"flex flex-col",
!plan.isPopular && "mt-5",
plans.length === 3 && (index === 0 || index === 2)
? "z-0 transform translate-x-0 translate-y-0 -translate-z-[50px] rotate-y-[10deg]"
: plans.length === 2 && !plan.isPopular
? "z-0"
: "z-10",
plans.length === 3 && index === 0 && "origin-right",
plans.length === 3 && index === 2 && "origin-left"
)}
>
<div
className={cn(
"grid grid-cols-1 gap-4",
plans.length === 2 ? "md:grid-cols-2 max-w-5xl mx-auto" : "md:grid-cols-3"
)}
>
{plans.map((plan, index) => (
<motion.div
key={index}
initial={{ y: 50, opacity: 1 }}
whileInView={
isDesktop
? plans.length === 2
? {
y: plan.isPopular ? -20 : 0,
opacity: 1,
scale: plan.isPopular ? 1.0 : 0.96,
}
: {
y: plan.isPopular ? -20 : 0,
opacity: 1,
x: index === 2 ? -30 : index === 0 ? 30 : 0,
scale: index === 0 || index === 2 ? 0.94 : 1.0,
}
: {}
}
viewport={{ once: true }}
transition={{
duration: 1.6,
type: "spring",
stiffness: 100,
damping: 30,
delay: 0.4,
opacity: { duration: 0.5 },
}}
className={cn(
`rounded-2xl border-[1px] p-6 bg-background text-center lg:flex lg:flex-col lg:justify-center relative`,
plan.isPopular ? "border-primary border-2" : "border-border",
"flex flex-col",
!plan.isPopular && "mt-5",
plans.length === 3 && (index === 0 || index === 2)
? "z-0 transform translate-x-0 translate-y-0 -translate-z-[50px] rotate-y-[10deg]"
: plans.length === 2 && !plan.isPopular
? "z-0"
: "z-10",
plans.length === 3 && index === 0 && "origin-right",
plans.length === 3 && index === 2 && "origin-left"
)}
>
{plan.isPopular && (
<div className="absolute top-0 right-0 bg-primary py-0.5 px-2 rounded-bl-xl rounded-tr-xl flex items-center">
<Star className="text-primary-foreground h-4 w-4 fill-current" />
@ -147,39 +149,39 @@ export function Pricing({
</div>
)}
<div className="flex-1 flex flex-col">
<p className="text-base font-semibold text-muted-foreground">{plan.name}</p>
<div className="mt-6 flex items-center justify-center gap-x-2">
<span className="text-5xl font-bold tracking-tight text-foreground">
{isNaN(Number(plan.price)) ? (
<span>{isMonthly ? plan.price : plan.yearlyPrice}</span>
) : (
<NumberFlow
value={isMonthly ? Number(plan.price) : Number(plan.yearlyPrice)}
format={{
style: "currency",
currency: "USD",
minimumFractionDigits: 0,
maximumFractionDigits: 0,
}}
transformTiming={{
duration: 500,
easing: "ease-out",
}}
willChange
className="font-variant-numeric: tabular-nums"
/>
)}
</span>
{plan.period && plan.period !== "Next 3 months" && (
<span className="text-sm font-semibold leading-6 tracking-wide text-muted-foreground">
/ {plan.period}
<p className="text-base font-semibold text-muted-foreground">{plan.name}</p>
<div className="mt-6 flex items-center justify-center gap-x-2">
<span className="text-5xl font-bold tracking-tight text-foreground">
{isNaN(Number(plan.price)) ? (
<span>{isMonthly ? plan.price : plan.yearlyPrice}</span>
) : (
<NumberFlow
value={isMonthly ? Number(plan.price) : Number(plan.yearlyPrice)}
format={{
style: "currency",
currency: "USD",
minimumFractionDigits: 0,
maximumFractionDigits: 0,
}}
transformTiming={{
duration: 500,
easing: "ease-out",
}}
willChange
className="font-variant-numeric: tabular-nums"
/>
)}
</span>
)}
</div>
{plan.period && plan.period !== "Next 3 months" && (
<span className="text-sm font-semibold leading-6 tracking-wide text-muted-foreground">
/ {plan.period}
</span>
)}
</div>
<p className="text-xs leading-5 text-muted-foreground">
{isNaN(Number(plan.price)) ? "" : isMonthly ? "billed monthly" : "billed annually"}
</p>
<p className="text-xs leading-5 text-muted-foreground">
{isNaN(Number(plan.price)) ? "" : isMonthly ? "billed monthly" : "billed annually"}
</p>
<ul className="mt-5 gap-2 flex flex-col">
{plan.features.map((feature, idx) => (