From 80920b5d8a25fb21e3743dce187bd0ab494007a4 Mon Sep 17 00:00:00 2001 From: rizky Date: Tue, 6 Aug 2024 02:11:10 -0700 Subject: [PATCH] fix import --- comps/list/lib/export_excel.tsx | 4 +-- comps/ui/calendar.tsx | 64 --------------------------------- comps/ui/input-otp.tsx | 38 +++++++++++--------- preset/menu/Menu.tsx | 2 +- utils/prasi-events.ts | 2 +- utils/router.tsx | 11 ------ 6 files changed, 24 insertions(+), 97 deletions(-) delete mode 100755 comps/ui/calendar.tsx delete mode 100755 utils/router.tsx diff --git a/comps/list/lib/export_excel.tsx b/comps/list/lib/export_excel.tsx index 0d1e5ed..74d3207 100755 --- a/comps/list/lib/export_excel.tsx +++ b/comps/list/lib/export_excel.tsx @@ -1,5 +1,3 @@ -import * as XLSX from "xlsx"; -import { TableListProp } from "../TableList"; import { filterWhere } from "lib/comps/filter/parser/filter-where"; import { call_prasi_events } from "lib/exports"; @@ -8,7 +6,7 @@ export const export_excel = async ({ tbl, on_load, }: { - list: TableListProp; + list: any; tbl: { columns: any[]; sort: { diff --git a/comps/ui/calendar.tsx b/comps/ui/calendar.tsx deleted file mode 100755 index c167225..0000000 --- a/comps/ui/calendar.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import * as React from "react" -import { ChevronLeft, ChevronRight } from "lucide-react" -import { DayPicker } from "react-day-picker" - -import { cn } from "@/utils" -import { buttonVariants } from "@/comps//ui/button" - -export type CalendarProps = React.ComponentProps - -function Calendar({ - className, - classNames, - showOutsideDays = true, - ...props -}: CalendarProps) { - return ( - , - IconRight: ({ ...props }) => , - }} - {...props} - /> - ) -} -Calendar.displayName = "Calendar" - -export { Calendar } diff --git a/comps/ui/input-otp.tsx b/comps/ui/input-otp.tsx index 4edde46..3ec72d9 100755 --- a/comps/ui/input-otp.tsx +++ b/comps/ui/input-otp.tsx @@ -1,8 +1,8 @@ -import * as React from "react" -import { OTPInput, OTPInputContext } from "input-otp" -import { Dot } from "lucide-react" +import * as React from "react"; +import { OTPInput, OTPInputContext } from "input-otp"; +import { Dot } from "lucide-react"; -import { cn } from "@/utils" +import { cn } from "@/utils"; const InputOTP = React.forwardRef< React.ElementRef, @@ -17,23 +17,27 @@ const InputOTP = React.forwardRef< className={cn("disabled:c-cursor-not-allowed", className)} {...props} /> -)) -InputOTP.displayName = "InputOTP" +)); +InputOTP.displayName = "InputOTP"; const InputOTPGroup = React.forwardRef< React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div"> >(({ className, ...props }, ref) => ( -
-)) -InputOTPGroup.displayName = "InputOTPGroup" +
+)); +InputOTPGroup.displayName = "InputOTPGroup"; const InputOTPSlot = React.forwardRef< React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div"> & { index: number } >(({ index, className, ...props }, ref) => { - const inputOTPContext = React.useContext(OTPInputContext) - const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] + const inputOTPContext = React.useContext(OTPInputContext); + const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]; return (
)}
- ) -}) -InputOTPSlot.displayName = "InputOTPSlot" + ); +}); +InputOTPSlot.displayName = "InputOTPSlot"; const InputOTPSeparator = React.forwardRef< React.ElementRef<"div">, @@ -63,7 +67,7 @@ const InputOTPSeparator = React.forwardRef<
-)) -InputOTPSeparator.displayName = "InputOTPSeparator" +)); +InputOTPSeparator.displayName = "InputOTPSeparator"; -export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator } +export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }; diff --git a/preset/menu/Menu.tsx b/preset/menu/Menu.tsx index 2a7c87c..e178939 100755 --- a/preset/menu/Menu.tsx +++ b/preset/menu/Menu.tsx @@ -42,7 +42,7 @@ export const Menu: FC = (props) => { return (
diff --git a/utils/prasi-events.ts b/utils/prasi-events.ts index b6cd93d..e693e3d 100755 --- a/utils/prasi-events.ts +++ b/utils/prasi-events.ts @@ -1,8 +1,8 @@ import { FieldLocal } from "lib/comps/form/typings"; import { FMLocal } from "../.."; -import { Prisma } from "../../typings/prisma"; import { set } from "./set"; import { MDLocal } from "lib/comps/md/utils/typings"; +import { Prisma } from "../../typings/prisma"; const events = { form: { diff --git a/utils/router.tsx b/utils/router.tsx deleted file mode 100755 index f4d2539..0000000 --- a/utils/router.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { router } from "app/router"; -type ROUTES = keyof typeof router; -export const route_params = async ( - route: T, - arg: ROUTES[] -) => { - const r = router[route]; - if (r) { - // r() - } -};