From c1444bbd83c49c7a1772c1403debe54fad2ba5e0 Mon Sep 17 00:00:00 2001 From: luizakp Date: Thu, 7 Mar 2024 15:40:24 -0300 Subject: [PATCH 1/6] send salt and receveir as ponderId --- src/lib/staticInputEncoder.ts | 10 +++++++--- src/lib/transactionFactory.ts | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/lib/staticInputEncoder.ts b/src/lib/staticInputEncoder.ts index 82513f8..5e07447 100644 --- a/src/lib/staticInputEncoder.ts +++ b/src/lib/staticInputEncoder.ts @@ -1,6 +1,6 @@ "use client"; -import { encodeAbiParameters, parseUnits } from "viem"; +import { Address, encodeAbiParameters, parseUnits } from "viem"; import { calculateAmounts } from "./calculateAmounts"; import { IStopLossRecipeData, TIME_OPTIONS_SECONDS } from "./types"; @@ -64,7 +64,8 @@ const stopLossDataStructure = [ ]; export async function stopLossArgsEncoder( - data: IStopLossRecipeData + data: IStopLossRecipeData, + salt: Address ): Promise<`0x${string}`> { const preHooks = HookFactory.createCoWHooks(data.preHooks); const postHooks = HookFactory.createCoWHooks(data.postHooks); @@ -76,11 +77,14 @@ export async function stopLossArgsEncoder( pre: preHooks, post: postHooks, }, + widget: { + appCode: "Stop Loss", + "ponderId": `${salt}-${data.receiver}` + } }, }); const { appDataHex, appDataContent } = await metadataApi.appDataToCid(appDataDoc); - await uploadAppData({ fullAppData: appDataContent, appDataHex, diff --git a/src/lib/transactionFactory.ts b/src/lib/transactionFactory.ts index 74819f3..79f9bc1 100644 --- a/src/lib/transactionFactory.ts +++ b/src/lib/transactionFactory.ts @@ -67,6 +67,7 @@ class ERC20ApproveRawTx implements ITransaction { class StopLossOrderTx implements ITransaction { async createRawTx(data: StopLossOrderArgs): Promise { + const salt = `0x${Date.now().toString(16).padEnd(64, "0")}` as Address; return { to: COMPOSABLE_COW_ADDRESS, value: "0", @@ -76,8 +77,8 @@ class StopLossOrderTx implements ITransaction { args: [ { handler: STOP_LOSS_ADDRESS, - salt: `0x${Date.now().toString(16).padEnd(64, "0")}`, - staticInput: await stopLossArgsEncoder(data), + salt: salt, + staticInput: await stopLossArgsEncoder(data, salt), }, true, ], From 7060e25bd2afcaa97591da6a3e7db37c18fa32ae Mon Sep 17 00:00:00 2001 From: luizakp Date: Thu, 7 Mar 2024 16:21:45 -0300 Subject: [PATCH 2/6] chore: ponder ID decoupled from decode app data --- src/lib/staticInputEncoder.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/staticInputEncoder.ts b/src/lib/staticInputEncoder.ts index 5e07447..a2a4319 100644 --- a/src/lib/staticInputEncoder.ts +++ b/src/lib/staticInputEncoder.ts @@ -7,6 +7,7 @@ import { IStopLossRecipeData, TIME_OPTIONS_SECONDS } from "./types"; import { HookFactory } from "./hooksFactory"; import { MetadataApi } from "@cowprotocol/app-data"; import { uploadAppData } from "./cowApi/uploadAppData"; +import { useSafeAppsSDK } from "@safe-global/safe-apps-react-sdk"; const stopLossDataStructure = [ { @@ -67,6 +68,7 @@ export async function stopLossArgsEncoder( data: IStopLossRecipeData, salt: Address ): Promise<`0x${string}`> { + const { safe } = useSafeAppsSDK(); const preHooks = HookFactory.createCoWHooks(data.preHooks); const postHooks = HookFactory.createCoWHooks(data.postHooks); const metadataApi = new MetadataApi(); @@ -79,7 +81,7 @@ export async function stopLossArgsEncoder( }, widget: { appCode: "Stop Loss", - "ponderId": `${salt}-${data.receiver}` + "ponderId": `${salt}-${safe.safeAddress}-${safe.chainId}` } }, }); From 0254fccb5e1806c83aeb6b525c9b32b4e2549cb7 Mon Sep 17 00:00:00 2001 From: luizakp Date: Thu, 7 Mar 2024 16:51:48 -0300 Subject: [PATCH 3/6] chore: add cow api fetcher --- src/lib/cowApi/fetchCowOrder.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/lib/cowApi/fetchCowOrder.ts diff --git a/src/lib/cowApi/fetchCowOrder.ts b/src/lib/cowApi/fetchCowOrder.ts new file mode 100644 index 0000000..bfb5937 --- /dev/null +++ b/src/lib/cowApi/fetchCowOrder.ts @@ -0,0 +1,17 @@ +import { Address } from "viem"; +import { ChainId } from "../publicClients"; +import { COW_API_URL_BY_CHAIN_ID } from "./api"; + +export async function getCowOrders( + userAddress: Address, + chainId: ChainId, + ) { + const url = COW_API_URL_BY_CHAIN_ID[chainId]; + + return fetch(`${url}/api/v1/account/${userAddress}/orders`, { + headers: { + Accept: "application/json", + }, + }).then((response) => response.json()); + } + \ No newline at end of file From bee5fadf0ca5fd9f237e11d1009b6a67a4c67faf Mon Sep 17 00:00:00 2001 From: luizakp Date: Mon, 11 Mar 2024 10:58:32 -0300 Subject: [PATCH 4/6] chore: get order data from API --- src/hooks/useOrders.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/hooks/useOrders.tsx b/src/hooks/useOrders.tsx index 60247b3..7775fd4 100644 --- a/src/hooks/useOrders.tsx +++ b/src/hooks/useOrders.tsx @@ -1,7 +1,9 @@ import { useSafeAppsSDK } from "@safe-global/safe-apps-react-sdk"; import gql from "graphql-tag"; import { useEffect, useState } from "react"; +import { Address } from "viem"; +import { getCowOrders } from "#/lib/cowApi/fetchCowOrder"; import { UserStopLossOrdersQuery } from "#/lib/gql/generated"; import { composableCowSubgraph } from "#/lib/gql/sdk"; import { ChainId } from "#/lib/publicClients"; @@ -56,6 +58,7 @@ gql( `, ); + export function useUserOrders() { const { safe } = useSafeAppsSDK(); const [loaded, setLoaded] = useState(false); @@ -74,7 +77,7 @@ export function useUserOrders() { const [processedOrders] = await Promise.all([ getProcessedStopLossOrders({ chainId: safe.chainId as ChainId, - address: safe.safeAddress, + address: safe.safeAddress as Address, }), ]); if (processedOrders !== undefined) { @@ -102,10 +105,15 @@ async function getProcessedStopLossOrders({ address, }: { chainId: ChainId; - address: string; + address: Address; }): Promise { const rawOrdersData = await composableCowSubgraph.UserStopLossOrders({ user: `${address}-${chainId}`, }); + + //TODO: use this on COW-100 + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const orderFromCowApi = await getCowOrders(address, chainId); + return rawOrdersData.orders.items; } From f44d96cb0cca0a5d0acff8d4b21446ec36317b47 Mon Sep 17 00:00:00 2001 From: luizakp Date: Mon, 11 Mar 2024 14:14:32 -0300 Subject: [PATCH 5/6] chore: move utils to its own folder --- .../(components)/OrderTable/TableRowOrder.tsx | 2 +- src/app/layout.tsx | 2 +- src/components/AlertCard.tsx | 2 +- src/components/Header.tsx | 2 +- src/components/TokenInfo.tsx | 2 +- src/components/menus/SwapMenu.tsx | 2 +- src/components/nodes/index.tsx | 2 +- src/components/ui/accordion.tsx | 2 +- src/components/ui/alert-dialog.tsx | 2 +- src/components/ui/alert.tsx | 2 +- src/components/ui/avatar.tsx | 2 +- src/components/ui/badge.tsx | 2 +- src/components/ui/button.tsx | 2 +- src/components/ui/calendar.tsx | 2 +- src/components/ui/card.tsx | 2 +- src/components/ui/carousel.tsx | 2 +- src/components/ui/checkbox.tsx | 2 +- src/components/ui/command.tsx | 2 +- src/components/ui/context-menu.tsx | 2 +- src/components/ui/dialog.tsx | 2 +- src/components/ui/drawer.tsx | 2 +- src/components/ui/dropdown-menu.tsx | 2 +- src/components/ui/form.tsx | 2 +- src/components/ui/hover-card.tsx | 2 +- src/components/ui/input.tsx | 2 +- src/components/ui/label.tsx | 2 +- src/components/ui/menubar.tsx | 2 +- src/components/ui/navigation-menu.tsx | 2 +- src/components/ui/pagination.tsx | 2 +- src/components/ui/popover.tsx | 2 +- src/components/ui/progress.tsx | 2 +- src/components/ui/radio-group.tsx | 2 +- src/components/ui/resizable.tsx | 2 +- src/components/ui/scroll-area.tsx | 2 +- src/components/ui/select.tsx | 2 +- src/components/ui/separator.tsx | 2 +- src/components/ui/sheet.tsx | 2 +- src/components/ui/skeleton.tsx | 2 +- src/components/ui/slider.tsx | 2 +- src/components/ui/switch.tsx | 2 +- src/components/ui/table.tsx | 2 +- src/components/ui/tabs.tsx | 2 +- src/components/ui/textarea.tsx | 2 +- src/components/ui/toast.tsx | 2 +- src/components/ui/toggle-group.tsx | 2 +- src/components/ui/toggle.tsx | 2 +- src/components/ui/tooltip.tsx | 2 +- src/contexts/networks.tsx | 2 +- src/hooks/useOrders.tsx | 2 +- src/lib/schema.ts | 2 +- src/utils/fetcher.ts | 50 +++++++++++++++++++ src/{lib/utils.ts => utils/index.ts} | 0 52 files changed, 100 insertions(+), 50 deletions(-) create mode 100644 src/utils/fetcher.ts rename src/{lib/utils.ts => utils/index.ts} (100%) diff --git a/src/app/history/(components)/OrderTable/TableRowOrder.tsx b/src/app/history/(components)/OrderTable/TableRowOrder.tsx index e12c5fd..93129f0 100644 --- a/src/app/history/(components)/OrderTable/TableRowOrder.tsx +++ b/src/app/history/(components)/OrderTable/TableRowOrder.tsx @@ -3,7 +3,7 @@ import { TrashIcon } from "@radix-ui/react-icons"; import Table from "#/components/Table"; import { TokenInfo } from "#/components/TokenInfo"; import { StopLossOrderType } from "#/hooks/useOrders"; -import { formatDateToLocalDatetime } from "#/lib/utils"; +import { formatDateToLocalDatetime } from "#/utils"; export function TableRowOrder({ order }: { order: StopLossOrderType }) { const orderStatus = "Created"; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 51cfe54..19fb22e 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -5,7 +5,7 @@ import { Inter as FontSans } from "next/font/google"; import { Footer } from "#/components/Footer"; import { RootLayout } from "#/components/RootLayout"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const fontSans = FontSans({ subsets: ["latin"], diff --git a/src/components/AlertCard.tsx b/src/components/AlertCard.tsx index fcca25e..c670fba 100644 --- a/src/components/AlertCard.tsx +++ b/src/components/AlertCard.tsx @@ -1,6 +1,6 @@ import cn from "clsx"; -import { capitalize } from "#/lib/utils"; +import { capitalize } from "#/utils"; export function AlertCard({ title, diff --git a/src/components/Header.tsx b/src/components/Header.tsx index ba0160c..ce47391 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -5,7 +5,7 @@ import Image from "next/image"; import Link from "next/link"; import { ReactNode } from "react"; -import { NetworkChainId, truncateAddress } from "#/lib/utils"; +import { NetworkChainId, truncateAddress } from "#/utils"; interface IHeader { linkUrl: string; diff --git a/src/components/TokenInfo.tsx b/src/components/TokenInfo.tsx index be07dd1..0d9376c 100644 --- a/src/components/TokenInfo.tsx +++ b/src/components/TokenInfo.tsx @@ -1,7 +1,7 @@ import Image from "next/image"; import { cowTokenList } from "#/lib/cowTokenList"; -import { formatNumber, truncateAddress } from "#/lib/utils"; +import { formatNumber, truncateAddress } from "#/utils"; export function TokenInfo({ symbol, diff --git a/src/components/menus/SwapMenu.tsx b/src/components/menus/SwapMenu.tsx index 9a82e28..6ea9132 100644 --- a/src/components/menus/SwapMenu.tsx +++ b/src/components/menus/SwapMenu.tsx @@ -7,7 +7,7 @@ import { useSafeBalances } from "#/hooks/useSafeBalances"; import { ChainId } from "#/lib/publicClients"; import { generateSwapSchema } from "#/lib/schema"; import { ISwapData, TIME_OPTIONS } from "#/lib/types"; -import { convertAndRoundDown, formatNumber } from "#/lib/utils"; +import { convertAndRoundDown, formatNumber } from "#/utils"; import Button from "../Button"; import { Checkbox } from "../Checkbox"; diff --git a/src/components/nodes/index.tsx b/src/components/nodes/index.tsx index aa8b26f..8aaa725 100644 --- a/src/components/nodes/index.tsx +++ b/src/components/nodes/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Handle, Position } from "reactflow"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; export interface IBaseNode { children: React.ReactNode; diff --git a/src/components/ui/accordion.tsx b/src/components/ui/accordion.tsx index ff1e1c4..0ba50b9 100644 --- a/src/components/ui/accordion.tsx +++ b/src/components/ui/accordion.tsx @@ -4,7 +4,7 @@ import * as AccordionPrimitive from "@radix-ui/react-accordion"; import { ChevronDownIcon } from "@radix-ui/react-icons"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const Accordion = AccordionPrimitive.Root; diff --git a/src/components/ui/alert-dialog.tsx b/src/components/ui/alert-dialog.tsx index b2c0f0a..c61089c 100644 --- a/src/components/ui/alert-dialog.tsx +++ b/src/components/ui/alert-dialog.tsx @@ -4,7 +4,7 @@ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"; import * as React from "react"; import { buttonVariants } from "#/components/ui/button"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const AlertDialog = AlertDialogPrimitive.Root; diff --git a/src/components/ui/alert.tsx b/src/components/ui/alert.tsx index 4bc32f3..f7e4ae7 100644 --- a/src/components/ui/alert.tsx +++ b/src/components/ui/alert.tsx @@ -1,7 +1,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const alertVariants = cva( "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", diff --git a/src/components/ui/avatar.tsx b/src/components/ui/avatar.tsx index 0126f6d..e5c06ae 100644 --- a/src/components/ui/avatar.tsx +++ b/src/components/ui/avatar.tsx @@ -3,7 +3,7 @@ import * as AvatarPrimitive from "@radix-ui/react-avatar"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const Avatar = React.forwardRef< React.ElementRef, diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx index 7e7ad17..649696e 100644 --- a/src/components/ui/badge.tsx +++ b/src/components/ui/badge.tsx @@ -1,7 +1,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const badgeVariants = cva( "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 3ab2892..ff841c4 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -2,7 +2,7 @@ import { Slot } from "@radix-ui/react-slot"; import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const buttonVariants = cva( "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", diff --git a/src/components/ui/calendar.tsx b/src/components/ui/calendar.tsx index 118a50d..ffd371e 100644 --- a/src/components/ui/calendar.tsx +++ b/src/components/ui/calendar.tsx @@ -5,7 +5,7 @@ import * as React from "react"; import { DayPicker } from "react-day-picker"; import { buttonVariants } from "#/components/ui/button"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; export type CalendarProps = React.ComponentProps; diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx index 8753d49..bf79cf3 100644 --- a/src/components/ui/card.tsx +++ b/src/components/ui/card.tsx @@ -1,6 +1,6 @@ import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const Card = React.forwardRef< HTMLDivElement, diff --git a/src/components/ui/carousel.tsx b/src/components/ui/carousel.tsx index 1d62b54..a954901 100644 --- a/src/components/ui/carousel.tsx +++ b/src/components/ui/carousel.tsx @@ -7,7 +7,7 @@ import useEmblaCarousel, { import * as React from "react"; import { Button } from "#/components/ui/button"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; type CarouselApi = UseEmblaCarouselType[1]; type UseCarouselParameters = Parameters; diff --git a/src/components/ui/checkbox.tsx b/src/components/ui/checkbox.tsx index e50539b..467daa1 100644 --- a/src/components/ui/checkbox.tsx +++ b/src/components/ui/checkbox.tsx @@ -4,7 +4,7 @@ import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; import { CheckIcon } from "@radix-ui/react-icons"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const Checkbox = React.forwardRef< React.ElementRef, diff --git a/src/components/ui/command.tsx b/src/components/ui/command.tsx index 7d255ec..9cc09fc 100644 --- a/src/components/ui/command.tsx +++ b/src/components/ui/command.tsx @@ -6,7 +6,7 @@ import { Command as CommandPrimitive } from "cmdk"; import * as React from "react"; import { Dialog, DialogContent } from "#/components/ui/dialog"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const Command = React.forwardRef< React.ElementRef, diff --git a/src/components/ui/context-menu.tsx b/src/components/ui/context-menu.tsx index 179a744..4ef22b1 100644 --- a/src/components/ui/context-menu.tsx +++ b/src/components/ui/context-menu.tsx @@ -8,7 +8,7 @@ import { } from "@radix-ui/react-icons"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const ContextMenu = ContextMenuPrimitive.Root; diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx index 6ad5429..b0b3974 100644 --- a/src/components/ui/dialog.tsx +++ b/src/components/ui/dialog.tsx @@ -4,7 +4,7 @@ import * as DialogPrimitive from "@radix-ui/react-dialog"; import { Cross2Icon } from "@radix-ui/react-icons"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const Dialog = DialogPrimitive.Root; diff --git a/src/components/ui/drawer.tsx b/src/components/ui/drawer.tsx index e24d9ea..2a71709 100644 --- a/src/components/ui/drawer.tsx +++ b/src/components/ui/drawer.tsx @@ -3,7 +3,7 @@ import * as React from "react"; import { Drawer as DrawerPrimitive } from "vaul"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const Drawer = ({ shouldScaleBackground = true, diff --git a/src/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx index c38f609..1bca0c1 100644 --- a/src/components/ui/dropdown-menu.tsx +++ b/src/components/ui/dropdown-menu.tsx @@ -8,7 +8,7 @@ import { } from "@radix-ui/react-icons"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const DropdownMenu = DropdownMenuPrimitive.Root; diff --git a/src/components/ui/form.tsx b/src/components/ui/form.tsx index a3aef6c..2e1d877 100644 --- a/src/components/ui/form.tsx +++ b/src/components/ui/form.tsx @@ -14,7 +14,7 @@ import { UseFormReturn, } from "react-hook-form"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; import { Label } from "./label"; diff --git a/src/components/ui/hover-card.tsx b/src/components/ui/hover-card.tsx index 0efc295..e336c22 100644 --- a/src/components/ui/hover-card.tsx +++ b/src/components/ui/hover-card.tsx @@ -3,7 +3,7 @@ import * as HoverCardPrimitive from "@radix-ui/react-hover-card"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const HoverCard = HoverCardPrimitive.Root; diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsx index 10cffa7..c73b95b 100644 --- a/src/components/ui/input.tsx +++ b/src/components/ui/input.tsx @@ -1,6 +1,6 @@ import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; export interface InputProps extends React.InputHTMLAttributes {} diff --git a/src/components/ui/label.tsx b/src/components/ui/label.tsx index 7a547f2..c627cff 100644 --- a/src/components/ui/label.tsx +++ b/src/components/ui/label.tsx @@ -4,7 +4,7 @@ import * as LabelPrimitive from "@radix-ui/react-label"; import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const labelVariants = cva( "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", diff --git a/src/components/ui/menubar.tsx b/src/components/ui/menubar.tsx index 932c47d..c2f964c 100644 --- a/src/components/ui/menubar.tsx +++ b/src/components/ui/menubar.tsx @@ -8,7 +8,7 @@ import { import * as MenubarPrimitive from "@radix-ui/react-menubar"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const MenubarMenu = MenubarPrimitive.Menu; diff --git a/src/components/ui/navigation-menu.tsx b/src/components/ui/navigation-menu.tsx index 997549b..1028aeb 100644 --- a/src/components/ui/navigation-menu.tsx +++ b/src/components/ui/navigation-menu.tsx @@ -3,7 +3,7 @@ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu"; import { cva } from "class-variance-authority"; import * as React from "react"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const NavigationMenu = React.forwardRef< React.ElementRef, diff --git a/src/components/ui/pagination.tsx b/src/components/ui/pagination.tsx index 4adbfa3..3029793 100644 --- a/src/components/ui/pagination.tsx +++ b/src/components/ui/pagination.tsx @@ -6,7 +6,7 @@ import { import * as React from "react"; import { ButtonProps, buttonVariants } from "#/components/ui/button"; -import { cn } from "#/lib/utils"; +import { cn } from "#/utils"; const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (