From f8e81419989f9bb377a00175b4e6c236df7ba651 Mon Sep 17 00:00:00 2001 From: John Yeo Date: Fri, 21 Mar 2025 16:48:54 +0800 Subject: [PATCH] update: replaced fontawesome icons with lucide --- package-lock.json | 45 +++++++ server/src/external/stripe/utils.ts | 18 ++- vite/package.json | 1 + .../src/components/general/OnboardingStep.tsx | 5 +- .../table-components/ToolbarButton.tsx | 5 +- vite/src/components/ui/button.tsx | 2 +- vite/src/views/credits/CreateCreditSystem.tsx | 110 ------------------ vite/src/views/credits/CreditSystemConfig.tsx | 13 +-- .../views/credits/CreditSystemRowToolbar.tsx | 5 +- vite/src/views/customers/FilterButton.tsx | 46 +------- vite/src/views/customers/SearchBar.tsx | 25 +--- .../customers/customer/CustomerDetails.tsx | 25 ++-- .../customer/CustomerProductList.tsx | 9 +- .../customers/customer/CustomerToolbar.tsx | 25 ++-- .../customer/add-product/AddProductButton.tsx | 39 +------ .../add-product/NewProductDropdown.tsx | 5 +- .../CustomerEntitlementToolbar.tsx | 11 +- .../customer/product/ProductOptionsButton.tsx | 15 ++- vite/src/views/developer/APIKeyTable.tsx | 24 +++- vite/src/views/developer/APIKeyToolbar.tsx | 21 +--- vite/src/views/developer/DevView.tsx | 23 +--- vite/src/views/features/FeatureRowToolbar.tsx | 12 +- vite/src/views/features/FeaturesView.tsx | 9 +- vite/src/views/general/ErrorScreen.tsx | 2 - vite/src/views/main-sidebar/EnvDropdown.tsx | 10 +- vite/src/views/main-sidebar/MainSidebar.tsx | 25 ++-- vite/src/views/main-sidebar/NavButton.tsx | 5 +- vite/src/views/main-sidebar/SidebarBottom.tsx | 9 +- .../src/views/main-sidebar/SidebarContact.tsx | 19 ++- vite/src/views/main-sidebar/SidebarTop.tsx | 26 ++--- vite/src/views/onboarding/OnboardingView.tsx | 25 ++-- vite/src/views/products/ProductRowToolbar.tsx | 10 +- vite/src/views/products/ProductsView.tsx | 6 +- .../views/products/coupons/CouponConfig.tsx | 56 ++++----- .../products/coupons/CouponRowToolbar.tsx | 8 +- .../products/product/EditFreeTrialToolbar.tsx | 8 +- .../products/product/EditProductToolbar.tsx | 13 +-- .../product/prices/CreateFixedPrice.tsx | 5 +- .../product/prices/CreateUsagePrice.tsx | 5 +- .../products/product/prices/PriceToolbar.tsx | 8 +- 40 files changed, 260 insertions(+), 473 deletions(-) diff --git a/package-lock.json b/package-lock.json index 31e0ede17..194271db0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14506,6 +14506,15 @@ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, + "node_modules/lucide-solid": { + "version": "0.483.0", + "resolved": "https://registry.npmjs.org/lucide-solid/-/lucide-solid-0.483.0.tgz", + "integrity": "sha512-eIDOr1FtctYkqOOlpt/0aCmM48cRJsyU+jdVGqxpMv+M27f2xN4ty09vQfZc/xt+JtWGBTmVtZjNAczIeXC+KQ==", + "license": "ISC", + "peerDependencies": { + "solid-js": "^1.4.7" + } + }, "node_modules/luxon": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz", @@ -18530,6 +18539,29 @@ "randombytes": "^2.1.0" } }, + "node_modules/seroval": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.2.1.tgz", + "integrity": "sha512-yBxFFs3zmkvKNmR0pFSU//rIsYjuX418TnlDmc2weaq5XFDqDIV/NOMPBoLrbxjLH42p4UzRuXHryXh9dYcKcw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/seroval-plugins": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.2.1.tgz", + "integrity": "sha512-H5vs53+39+x4Udwp4J5rNZfgFuA+Lt+uU+09w1gYBVWomtAl98B+E9w7yC05Xc81/HgLvJdlyqJbU0fJCKCmdw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "seroval": "^1.0" + } + }, "node_modules/server-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/server-only/-/server-only-0.0.1.tgz", @@ -18908,6 +18940,18 @@ "node": ">= 14" } }, + "node_modules/solid-js": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.9.5.tgz", + "integrity": "sha512-ogI3DaFcyn6UhYhrgcyRAMbu/buBJitYQASZz5WzfQVPP10RD2AbCoRZ517psnezrasyCbWzIxZ6kVqet768xw==", + "license": "MIT", + "peer": true, + "dependencies": { + "csstype": "^3.1.0", + "seroval": "^1.1.0", + "seroval-plugins": "^1.1.0" + } + }, "node_modules/sonic-boom": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.0.tgz", @@ -22992,6 +23036,7 @@ "hast-util-to-html": "^9.0.5", "lodash": "^4.17.21", "lucide-react": "^0.479.0", + "lucide-solid": "^0.483.0", "next-themes": "^0.4.6", "posthog-js": "^1.230.4", "react": "^18.2.0", diff --git a/server/src/external/stripe/utils.ts b/server/src/external/stripe/utils.ts index 19ba7cab1..2d7e90dd2 100644 --- a/server/src/external/stripe/utils.ts +++ b/server/src/external/stripe/utils.ts @@ -11,6 +11,23 @@ import { import { AppEnv } from "@autumn/shared"; import Stripe from "stripe"; +import { createSupabaseClient } from "../supabaseUtils.js"; +import { OrgService } from "@/internal/orgs/OrgService.js"; + +export const orgIdToStripeCli = async ({ + orgId, + env, +}: { + orgId: string; + env: AppEnv; +}) => { + const sb = createSupabaseClient(); + const org = await OrgService.getFullOrg({ + sb, + orgId, + }); + return createStripeCli({ org, env }); +}; export const createStripeCli = ({ org, @@ -31,7 +48,6 @@ export const createStripeCli = ({ : org.stripe_config.live_api_key; let decrypted = decryptData(encrypted); - return new Stripe(decrypted); }; diff --git a/vite/package.json b/vite/package.json index f47c28516..75b50bcfe 100644 --- a/vite/package.json +++ b/vite/package.json @@ -42,6 +42,7 @@ "hast-util-to-html": "^9.0.5", "lodash": "^4.17.21", "lucide-react": "^0.479.0", + "lucide-solid": "^0.483.0", "next-themes": "^0.4.6", "posthog-js": "^1.230.4", "react": "^18.2.0", diff --git a/vite/src/components/general/OnboardingStep.tsx b/vite/src/components/general/OnboardingStep.tsx index 913666eff..bb87d7a3e 100644 --- a/vite/src/components/general/OnboardingStep.tsx +++ b/vite/src/components/general/OnboardingStep.tsx @@ -1,7 +1,6 @@ import React from "react"; import { cn } from "@/lib/utils"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faCoin } from "@fortawesome/pro-duotone-svg-icons"; +import { Wallet } from "lucide-react"; interface StepProps { title: string; @@ -19,7 +18,7 @@ function Step({ title, children, className, description }: StepProps) { )} >
- +

{title}

diff --git a/vite/src/components/general/table-components/ToolbarButton.tsx b/vite/src/components/general/table-components/ToolbarButton.tsx index 470d762a7..5897adc44 100644 --- a/vite/src/components/general/table-components/ToolbarButton.tsx +++ b/vite/src/components/general/table-components/ToolbarButton.tsx @@ -1,8 +1,7 @@ import { Button, ButtonProps } from "@/components/ui/button"; import { cn } from "@/lib/utils"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faEllipsisVertical } from "@fortawesome/pro-regular-svg-icons"; import { forwardRef } from "react"; +import { EllipsisVertical } from "lucide-react"; export const ToolbarButton = forwardRef( (props, ref) => { @@ -17,7 +16,7 @@ export const ToolbarButton = forwardRef( )} {...props} > - + ); } diff --git a/vite/src/components/ui/button.tsx b/vite/src/components/ui/button.tsx index bfff27a02..98ea11cc7 100644 --- a/vite/src/components/ui/button.tsx +++ b/vite/src/components/ui/button.tsx @@ -82,7 +82,7 @@ const Button = React.forwardRef( {...props} className={cn( buttonVariants({ variant, size, className }), - isIcon && `w-${dim} h-${dim}` + isIcon && `w-${dim} h-${dim} p-0` )} ref={ref} onClick={(e) => { diff --git a/vite/src/views/credits/CreateCreditSystem.tsx b/vite/src/views/credits/CreateCreditSystem.tsx index 7c9183475..29dbaecdd 100644 --- a/vite/src/views/credits/CreateCreditSystem.tsx +++ b/vite/src/views/credits/CreateCreditSystem.tsx @@ -1,7 +1,3 @@ -import FieldLabel from "@/components/general/modal-components/FieldLabel"; -import { SelectContent } from "@/components/ui/select"; -import { SelectTrigger, SelectValue } from "@/components/ui/select"; -import { SelectItem } from "@/components/ui/select"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -110,112 +106,6 @@ function CreateCreditSystem() { setCreditSystem={setCreditSystem} /> - {/*
-
-
- Name - { - const newFields: any = { ...fields, name: e.target.value }; - if (!idChanged) { - newFields.id = slugify(e.target.value); - } - setFields(newFields); - }} - /> -
-
- ID - { - setFields({ ...fields, id: e.target.value }); - setIdChanged(true); - }} - /> -
-
- -
- Schema - -
- Meter - - Metered Amount - - - Credit Amount - -

- - {creditSystemConfig.schema.map((item, index) => ( - - - - - handleSchemaChange( - index, - "feature_amount", - e.target.value - ) - } - /> - - handleSchemaChange(index, "credit_amount", e.target.value) - } - /> -
- -
-
- ))} -
- - -
-
*/}
diff --git a/vite/src/views/credits/CreditSystemRowToolbar.tsx b/vite/src/views/credits/CreditSystemRowToolbar.tsx index 6146b124a..3e652eaf0 100644 --- a/vite/src/views/credits/CreditSystemRowToolbar.tsx +++ b/vite/src/views/credits/CreditSystemRowToolbar.tsx @@ -1,6 +1,4 @@ import SmallSpinner from "@/components/general/SmallSpinner"; -import { faTrash } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { DropdownMenu, DropdownMenuTrigger, @@ -16,6 +14,7 @@ import { FeatureService } from "@/services/FeatureService"; import { getBackendErr } from "@/utils/genUtils"; import { useFeaturesContext } from "../features/FeaturesContext"; import { ToolbarButton } from "@/components/general/table-components/ToolbarButton"; +import { Delete } from "lucide-react"; export const CreditSystemRowToolbar = ({ creditSystem, @@ -59,7 +58,7 @@ export const CreditSystemRowToolbar = ({ {deleteLoading ? ( ) : ( - + )} diff --git a/vite/src/views/customers/FilterButton.tsx b/vite/src/views/customers/FilterButton.tsx index f1dad08fe..4e242a139 100644 --- a/vite/src/views/customers/FilterButton.tsx +++ b/vite/src/views/customers/FilterButton.tsx @@ -9,17 +9,12 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { - faBarsFilter, - faCheck, - faXmark, -} from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useCustomersContext } from "./CustomersContext"; import { keyToTitle } from "@/utils/formatUtils/formatTextUtils"; +import { Check, ListFilter, X } from "lucide-react"; function FilterButton() { - const { filters, setFilters, products } = useCustomersContext(); + const { setFilters } = useCustomersContext(); return ( @@ -41,7 +36,7 @@ function FilterButton() { onClick={() => setFilters({})} className="cursor-pointer" > - + Clear @@ -76,9 +71,7 @@ export const FilterStatus = () => { className="flex items-center justify-between cursor-pointer text-sm" > {keyToTitle(status)} - {isActive && ( - - )} + {isActive && } ); })} @@ -108,9 +101,7 @@ export const ProductStatus = () => { className="flex items-center justify-between cursor-pointer" > {product.name} - {isActive && ( - - )} + {isActive && } ); })} @@ -122,34 +113,9 @@ export const RenderFilterTrigger = ({ setOpen }: any) => { return ( ); }; - -// export const FilterField = ({ field, type, options }: any) => { -// // TODO: Create function to get field name -// const { filter, setFilter } = useCustomersContext(); - -// if (type == "select") { -// return ( -// -// {field} -// -// -// {options.map((option: any) => ( -// setFilter({ [field]: option })} -// > -// {keyToTitle(option)} -// -// ))} -// -// -// -// ); -// } -// }; diff --git a/vite/src/views/customers/SearchBar.tsx b/vite/src/views/customers/SearchBar.tsx index 1c17b0d8b..15f619a7c 100644 --- a/vite/src/views/customers/SearchBar.tsx +++ b/vite/src/views/customers/SearchBar.tsx @@ -1,8 +1,7 @@ import SmallSpinner from "@/components/general/SmallSpinner"; -import { faMagnifyingGlass } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { debounce } from "lodash"; import { useMemo, useRef, useState } from "react"; +import { Search } from "lucide-react"; export function SearchBar({ query, @@ -42,11 +41,7 @@ export function SearchBar({ className="rounded-sm border-1 shadow-sm py-1 h-8 px-2 text-sm flex items-center w-full bg-white" > - + {loading && } - // - // - // - // ) - // } - // /> ); } diff --git a/vite/src/views/customers/customer/CustomerDetails.tsx b/vite/src/views/customers/customer/CustomerDetails.tsx index 57f18d470..d3dcf05de 100644 --- a/vite/src/views/customers/customer/CustomerDetails.tsx +++ b/vite/src/views/customers/customer/CustomerDetails.tsx @@ -2,12 +2,9 @@ import { useCustomerContext } from "./CustomerContext"; import { getStripeCusLink } from "@/utils/linkUtils"; import { Product } from "@autumn/shared"; import { faStripe } from "@fortawesome/free-brands-svg-icons"; -import { - faArrowUpRightFromSquare, - faCheck, - faCopy, -} from "@fortawesome/pro-duotone-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { ArrowUpRightFromSquare, Check } from "lucide-react"; +import { Copy } from "lucide-react"; import { useState } from "react"; import { Link } from "react-router"; @@ -74,14 +71,15 @@ export const CustomerDetails = () => { {customer.id}

{(idCopied || idHover) && ( - { navigator.clipboard.writeText(customer.id); setIdCopied(true); }} - /> + > + {idCopied ? : } + )} @@ -127,14 +125,9 @@ export const CustomerDetails = () => {
- +
)} diff --git a/vite/src/views/customers/customer/CustomerProductList.tsx b/vite/src/views/customers/customer/CustomerProductList.tsx index 9136e8d5a..dc4935fc5 100644 --- a/vite/src/views/customers/customer/CustomerProductList.tsx +++ b/vite/src/views/customers/customer/CustomerProductList.tsx @@ -20,9 +20,6 @@ import { } from "@/components/ui/dropdown-menu"; import { Button } from "@/components/ui/button"; import { useState } from "react"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faEllipsisVertical } from "@fortawesome/pro-regular-svg-icons"; -import { faArrowUpRightFromSquare } from "@fortawesome/pro-duotone-svg-icons"; import { keyToTitle } from "@/utils/formatUtils/formatTextUtils"; import { CusService } from "@/services/customers/CusService"; import { useAxiosInstance } from "@/services/useAxiosInstance"; @@ -35,6 +32,7 @@ import { getStripeSubLink } from "@/utils/linkUtils"; import React from "react"; import { cn } from "@/lib/utils"; import { ToolbarButton } from "@/components/general/table-components/ToolbarButton"; +import { ArrowUpRightFromSquare } from "lucide-react"; export const CustomerProductList = ({ customer, @@ -129,10 +127,9 @@ export const CustomerProductList = ({ }} >
-
diff --git a/vite/src/views/customers/customer/CustomerToolbar.tsx b/vite/src/views/customers/customer/CustomerToolbar.tsx index 499aa344b..69bb1f52e 100644 --- a/vite/src/views/customers/customer/CustomerToolbar.tsx +++ b/vite/src/views/customers/customer/CustomerToolbar.tsx @@ -1,6 +1,4 @@ import SmallSpinner from "@/components/general/SmallSpinner"; -import { faPen, faTrash } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { DropdownMenu, @@ -16,7 +14,7 @@ import { Customer } from "@autumn/shared"; import { useCustomerContext } from "./CustomerContext"; import { CusService } from "@/services/customers/CusService"; import { useNavigate } from "react-router"; -import { faCog, faTicket } from "@fortawesome/pro-duotone-svg-icons"; + import { navigateTo } from "@/utils/genUtils"; import React from "react"; @@ -24,6 +22,15 @@ import { Dialog, DialogTrigger } from "@/components/ui/dialog"; import AddCouponDialogContent from "./add-coupon/AddCouponDialogContent"; import { cn } from "@/lib/utils"; import UpdateCustomerDialog from "./UpdateCustomerDialog"; +import { + Delete, + Pen, + Pencil, + Settings, + Settings2, + Ticket, + Trash, +} from "lucide-react"; export const CustomerToolbar = ({ className, @@ -80,7 +87,7 @@ export const CustomerToolbar = ({ dim={6} className={cn("rounded-full", className)} > - + @@ -93,7 +100,7 @@ export const CustomerToolbar = ({ >

Add Coupon

- +

Update

- +
@@ -118,11 +125,7 @@ export const CustomerToolbar = ({ >
Delete - {deleteLoading ? ( - - ) : ( - - )} + {deleteLoading ? : }
diff --git a/vite/src/views/customers/customer/add-product/AddProductButton.tsx b/vite/src/views/customers/customer/add-product/AddProductButton.tsx index 49959dda7..de508cb8e 100644 --- a/vite/src/views/customers/customer/add-product/AddProductButton.tsx +++ b/vite/src/views/customers/customer/add-product/AddProductButton.tsx @@ -5,11 +5,6 @@ import { TooltipContent, } from "@/components/ui/tooltip"; import { Button } from "@/components/ui/button"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { - faFileInvoiceDollar, - faUpload, -} from "@fortawesome/pro-duotone-svg-icons"; import { useState } from "react"; import { @@ -18,8 +13,8 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { faCartShopping } from "@fortawesome/pro-duotone-svg-icons/faCartShopping"; import { ProductActionState } from "@/utils/models"; +import { File, ShoppingCart, Upload } from "lucide-react"; export const AddProductButton = ({ setUseInvoice, @@ -74,7 +69,7 @@ export const AddProductButton = ({ className="w-fit gap-2" isLoading={loading} disabled={actionState.disabled} - startIcon={} + startIcon={} > {actionState.buttonText} @@ -91,7 +86,7 @@ export const AddProductButton = ({ onClick={() => setOpen(true)} variant="gradientPrimary" className="w-fit gap-2" - startIcon={} + startIcon={} disabled={actionState.disabled} > {actionState.buttonText} @@ -108,11 +103,8 @@ export const AddProductButton = ({ className="h-8 flex items-center justify-between" >
- + +

Checkout

@@ -122,11 +114,7 @@ export const AddProductButton = ({ className="h-8 flex items-center justify-between" >
- +

Invoice

@@ -134,18 +122,3 @@ export const AddProductButton = ({
); }; - -{ - /*
- -
*/ -} diff --git a/vite/src/views/customers/customer/add-product/NewProductDropdown.tsx b/vite/src/views/customers/customer/add-product/NewProductDropdown.tsx index 388ec1b85..c941127f4 100644 --- a/vite/src/views/customers/customer/add-product/NewProductDropdown.tsx +++ b/vite/src/views/customers/customer/add-product/NewProductDropdown.tsx @@ -11,7 +11,7 @@ import { useCustomerContext } from "../CustomerContext"; import { useAxiosInstance } from "@/services/useAxiosInstance"; import { AddProductContext } from "./CreateCheckoutContext"; import { Input } from "@/components/ui/input"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; + import { faSearch } from "@fortawesome/pro-solid-svg-icons"; import { useNavigate } from "react-router"; import { getRedirectUrl, navigateTo } from "@/utils/genUtils"; @@ -19,6 +19,7 @@ import { toast } from "sonner"; import { OrgService } from "@/services/OrgService"; import { Product } from "@autumn/shared"; import SmallSpinner from "@/components/general/SmallSpinner"; +import { Search } from "lucide-react"; function AddProduct() { const { products, customer, env, org } = useCustomerContext(); @@ -76,7 +77,7 @@ function AddProduct() {
- + - + @@ -61,11 +62,7 @@ export const CustomerEntitlementToolbar = ({ >
Delete - {deleteLoading ? ( - - ) : ( - - )} + {deleteLoading ? : }
diff --git a/vite/src/views/customers/customer/product/ProductOptionsButton.tsx b/vite/src/views/customers/customer/product/ProductOptionsButton.tsx index 91bc3a3a6..659343a0e 100644 --- a/vite/src/views/customers/customer/product/ProductOptionsButton.tsx +++ b/vite/src/views/customers/customer/product/ProductOptionsButton.tsx @@ -1,12 +1,17 @@ -import { faCircleDollar } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Button } from "@/components/ui/button"; -import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"; +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "@/components/ui/dialog"; import { useProductContext } from "@/views/products/product/ProductContext"; +import { DollarSign } from "lucide-react"; export const ProductOptionsButton = () => { const { product } = useProductContext(); -// console.log(product); + // console.log(product); return ( @@ -14,7 +19,7 @@ export const ProductOptionsButton = () => { diff --git a/vite/src/views/developer/APIKeyTable.tsx b/vite/src/views/developer/APIKeyTable.tsx index fef9f1403..d7b7b8514 100644 --- a/vite/src/views/developer/APIKeyTable.tsx +++ b/vite/src/views/developer/APIKeyTable.tsx @@ -3,7 +3,14 @@ import { ApiKey } from "@autumn/shared"; import React from "react"; import { APIKeyToolbar } from "./APIKeyToolbar"; -import { Table, TableHead, TableHeader, TableRow, TableBody, TableCell } from "@/components/ui/table"; +import { + Table, + TableHead, + TableHeader, + TableRow, + TableBody, + TableCell, +} from "@/components/ui/table"; export const APIKeyTable = ({ apiKeys }: { apiKeys: ApiKey[] }) => { // let { org } = useHomeContext(); @@ -22,12 +29,17 @@ export const APIKeyTable = ({ apiKeys }: { apiKeys: ApiKey[] }) => { {apiKeys.map((key) => ( {key.name} - {key.prefix} + + {key.prefix} + - {formatUnixToDateTime(key.created_at).date} - {formatUnixToDateTime(key.created_at).time} - - + {formatUnixToDateTime(key.created_at).date} + + {" "} + {formatUnixToDateTime(key.created_at).time}{" "} + + + diff --git a/vite/src/views/developer/APIKeyToolbar.tsx b/vite/src/views/developer/APIKeyToolbar.tsx index 3275d9b22..9033a6647 100644 --- a/vite/src/views/developer/APIKeyToolbar.tsx +++ b/vite/src/views/developer/APIKeyToolbar.tsx @@ -1,7 +1,5 @@ import SmallSpinner from "@/components/general/SmallSpinner"; -import { faEllipsisVertical, faTrash } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { cn } from "@/lib/utils"; + import { DropdownMenu, DropdownMenuTrigger, @@ -10,20 +8,15 @@ import { } from "@/components/ui/dropdown-menu"; import { useState } from "react"; import { toast } from "sonner"; -import { Button } from "@/components/ui/button"; + import { useDevContext } from "./DevContext"; import { useAxiosInstance } from "@/services/useAxiosInstance"; import { DevService } from "@/services/DevService"; import { ApiKey } from "@autumn/shared"; import { ToolbarButton } from "@/components/general/table-components/ToolbarButton"; +import { Delete } from "lucide-react"; -export const APIKeyToolbar = ({ - className, - apiKey, -}: { - className?: string; - apiKey: ApiKey; -}) => { +export const APIKeyToolbar = ({ apiKey }: { apiKey: ApiKey }) => { const { mutate, env } = useDevContext(); const axiosInstance = useAxiosInstance({ env }); const [deleteLoading, setDeleteLoading] = useState(false); @@ -56,11 +49,7 @@ export const APIKeyToolbar = ({ >
Delete - {deleteLoading ? ( - - ) : ( - - )} + {deleteLoading ? : }
diff --git a/vite/src/views/developer/DevView.tsx b/vite/src/views/developer/DevView.tsx index dd4ac5ed4..8013b97fa 100644 --- a/vite/src/views/developer/DevView.tsx +++ b/vite/src/views/developer/DevView.tsx @@ -4,7 +4,7 @@ import { useAxiosSWR } from "@/services/useAxiosSwr"; import LoadingScreen from "../general/LoadingScreen"; import CreateAPIKey from "./CreateAPIKey"; import { AppEnv } from "@autumn/shared"; -import { Toaster } from "sonner"; + import { DevContext } from "./DevContext"; import { APIKeyTable } from "./APIKeyTable"; import CopyButton from "@/components/general/CopyButton"; @@ -24,13 +24,6 @@ export default function DevScreen({ env }: { env: AppEnv }) { return ( -

Developer

Secret API Keys

@@ -69,20 +62,6 @@ export default function DevScreen({ env }: { env: AppEnv }) { )}
- - {/*
-

Webhooks

-
- -
-
*/} ); } diff --git a/vite/src/views/features/FeatureRowToolbar.tsx b/vite/src/views/features/FeatureRowToolbar.tsx index 6f2424f2e..cfa8df4ea 100644 --- a/vite/src/views/features/FeatureRowToolbar.tsx +++ b/vite/src/views/features/FeatureRowToolbar.tsx @@ -1,7 +1,5 @@ import SmallSpinner from "@/components/general/SmallSpinner"; -import { faEllipsisVertical, faTrash } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { cn } from "@/lib/utils"; + import { DropdownMenu, DropdownMenuTrigger, @@ -10,7 +8,6 @@ import { } from "@/components/ui/dropdown-menu"; import { useState } from "react"; import { toast } from "sonner"; -import { Button } from "@/components/ui/button"; import { useAxiosInstance } from "@/services/useAxiosInstance"; import { Feature } from "@autumn/shared"; @@ -18,6 +15,7 @@ import { useFeaturesContext } from "./FeaturesContext"; import { FeatureService } from "@/services/FeatureService"; import { getBackendErr } from "@/utils/genUtils"; import { ToolbarButton } from "@/components/general/table-components/ToolbarButton"; +import { Delete } from "lucide-react"; export const FeatureRowToolbar = ({ className, @@ -59,11 +57,7 @@ export const FeatureRowToolbar = ({ >
Delete - {deleteLoading ? ( - - ) : ( - - )} + {deleteLoading ? : }
diff --git a/vite/src/views/features/FeaturesView.tsx b/vite/src/views/features/FeaturesView.tsx index d6c79b4cf..a3378ef9d 100644 --- a/vite/src/views/features/FeaturesView.tsx +++ b/vite/src/views/features/FeaturesView.tsx @@ -9,16 +9,11 @@ import { AppEnv } from "@autumn/shared"; import LoadingScreen from "../general/LoadingScreen"; import { FeaturesTable } from "./FeaturesTable"; -import { CustomToaster } from "@/components/general/CustomToaster"; -import { Button } from "@/components/ui/button"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; - -import { faDollarCircle } from "@fortawesome/pro-duotone-svg-icons"; -import { cn } from "@/lib/utils"; import { CreditSystemsTable } from "../credits/CreditSystemsTable"; import CreateCreditSystem from "../credits/CreateCreditSystem"; import { ToggleDisplayButton } from "@/components/general/ToggleDisplayButton"; import ErrorScreen from "../general/ErrorScreen"; +import { Banknote, DollarSign } from "lucide-react"; function FeaturesView({ env }: { env: AppEnv }) { const [showCredits, setShowCredits] = useState(false); @@ -74,7 +69,7 @@ function FeaturesView({ env }: { env: AppEnv }) { disabled={creditSystems.length > 0} onClick={() => setShowCredits(!showCredits)} > - + Credit Systems diff --git a/vite/src/views/general/ErrorScreen.tsx b/vite/src/views/general/ErrorScreen.tsx index e910de065..25d68fd49 100644 --- a/vite/src/views/general/ErrorScreen.tsx +++ b/vite/src/views/general/ErrorScreen.tsx @@ -3,8 +3,6 @@ import { useEnv } from "@/utils/envUtils"; import { Link } from "react-router"; import React from "react"; import { getRedirectUrl } from "@/utils/genUtils"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faArrowLeft } from "@fortawesome/pro-regular-svg-icons"; function ErrorScreen({ children, diff --git a/vite/src/views/main-sidebar/EnvDropdown.tsx b/vite/src/views/main-sidebar/EnvDropdown.tsx index 0a7a22fee..435b11d04 100644 --- a/vite/src/views/main-sidebar/EnvDropdown.tsx +++ b/vite/src/views/main-sidebar/EnvDropdown.tsx @@ -9,11 +9,11 @@ import { import { AppEnv } from "@autumn/shared"; import { envToPath } from "@/utils/genUtils"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faCheck, faChevronDown } from "@fortawesome/pro-regular-svg-icons"; + import { useLocation } from "react-router"; import { useSidebarContext } from "./SidebarContext"; import { cn } from "@/lib/utils"; +import { Check, ChevronDown } from "lucide-react"; export const EnvDropdown = ({ env }: { env: AppEnv }) => { const location = useLocation(); @@ -44,7 +44,7 @@ export const EnvDropdown = ({ env }: { env: AppEnv }) => { {state == "expanded" ? (

{envText}

- +
) : (

{envText.slice(0, 1)}

@@ -62,7 +62,7 @@ export const EnvDropdown = ({ env }: { env: AppEnv }) => { > Sandbox {env === AppEnv.Sandbox && ( - + )} @@ -74,7 +74,7 @@ export const EnvDropdown = ({ env }: { env: AppEnv }) => { > Production {env === AppEnv.Live && ( - + )} diff --git a/vite/src/views/main-sidebar/MainSidebar.tsx b/vite/src/views/main-sidebar/MainSidebar.tsx index 46a633969..83208923b 100644 --- a/vite/src/views/main-sidebar/MainSidebar.tsx +++ b/vite/src/views/main-sidebar/MainSidebar.tsx @@ -1,14 +1,3 @@ -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { - faCode, - faFileLines, - faFlag, - faTag, - faToggleOff, - faUser, - faUsers, -} from "@fortawesome/pro-duotone-svg-icons"; - import { NavButton } from "./NavButton"; import { SidebarTop } from "./SidebarTop"; @@ -18,6 +7,7 @@ import { useState } from "react"; import { cn } from "@/lib/utils"; import { SidebarContext } from "./SidebarContext"; import { useHotkeys } from "react-hotkeys-hook"; +import { Code, Flag, Tag, User } from "lucide-react"; export const MainSidebar = () => { const env = useEnv(); @@ -42,23 +32,28 @@ export const MainSidebar = () => {
} title="Features" env={env} /> } title="Products" env={env} /> } title="Customers" env={env} /> - + } + title="Developer" + env={env} + />
{/* Sidebar bottom */} diff --git a/vite/src/views/main-sidebar/NavButton.tsx b/vite/src/views/main-sidebar/NavButton.tsx index bd3885c06..cf5572433 100644 --- a/vite/src/views/main-sidebar/NavButton.tsx +++ b/vite/src/views/main-sidebar/NavButton.tsx @@ -1,13 +1,10 @@ import { useTab } from "@/hooks/useTab"; import { cn } from "@/lib/utils"; import { getRedirectUrl } from "@/utils/genUtils"; - import { AppEnv } from "@autumn/shared"; import { Link } from "react-router"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useState } from "react"; import { useSidebarContext } from "./SidebarContext"; -import posthog from "posthog-js"; export const NavButton = ({ value, @@ -51,7 +48,7 @@ export const NavButton = ({ isHovered && "translate-x-[-1px]" )} > - + {icon} {state == "expanded" && {title}} diff --git a/vite/src/views/main-sidebar/SidebarBottom.tsx b/vite/src/views/main-sidebar/SidebarBottom.tsx index 58376bfbc..26ff85097 100644 --- a/vite/src/views/main-sidebar/SidebarBottom.tsx +++ b/vite/src/views/main-sidebar/SidebarBottom.tsx @@ -1,13 +1,13 @@ "use client"; import { UserButton, useUser } from "@clerk/clerk-react"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faBook, faCircleNodes } from "@fortawesome/pro-duotone-svg-icons"; + import { NavButton } from "./NavButton"; import { useEnv } from "@/utils/envUtils"; import { SidebarContact } from "./SidebarContact"; import { useSidebarContext } from "./SidebarContext"; import { cn } from "@/lib/utils"; +import { Blocks, Book } from "lucide-react"; export default function SidebarBottom() { const env = useEnv(); @@ -20,20 +20,19 @@ export default function SidebarBottom() {
} title="Connect to Stripe" env={env} /> } title="Documentation" env={env} href="https://docs.useautumn.com" />
- {/* */}
} title="Chat with us" />
@@ -45,18 +47,15 @@ export function SidebarContact() { onClick={() => (window.location.href = `mailto:${email}`)} className="cursor-pointer" > - {email} - +
+ {email} + +
window.open("https://cal.com/ayrod", "_blank")} className="cursor-pointer" > - {/* */} Book a call diff --git a/vite/src/views/main-sidebar/SidebarTop.tsx b/vite/src/views/main-sidebar/SidebarTop.tsx index f5b370df0..d9a4115af 100644 --- a/vite/src/views/main-sidebar/SidebarTop.tsx +++ b/vite/src/views/main-sidebar/SidebarTop.tsx @@ -6,14 +6,7 @@ import { } from "@clerk/clerk-react"; import { useEffect, useRef, useState } from "react"; import { Button } from "@/components/ui/button"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { - faCheck, - faChevronLeft, - faChevronRight, - faCopy, -} from "@fortawesome/pro-regular-svg-icons"; -import CopyButton from "@/components/general/CopyButton"; + import { EnvDropdown } from "./EnvDropdown"; import { useEnv } from "@/utils/envUtils"; @@ -24,6 +17,7 @@ import { TooltipProvider, TooltipTrigger, } from "@/components/ui/tooltip"; +import { Check, ChevronLeft, ChevronRight, Copy } from "lucide-react"; export const SidebarTop = () => { const { isLoaded, user } = useUser(); @@ -108,9 +102,11 @@ export const SidebarTop = () => { variant="ghost" className="p-0 w-5 h-5 text-t3 m-0" > - + {state == "expanded" ? ( + + ) : ( + + )} @@ -141,14 +137,14 @@ const CopyText = ({ text }: { text: string }) => { {text}

{(isCopied || isHover) && ( - { navigator.clipboard.writeText(text); setIsCopied(true); }} - /> + > + {isCopied ? : } + )} ); diff --git a/vite/src/views/onboarding/OnboardingView.tsx b/vite/src/views/onboarding/OnboardingView.tsx index c696654e0..c19c9ed00 100644 --- a/vite/src/views/onboarding/OnboardingView.tsx +++ b/vite/src/views/onboarding/OnboardingView.tsx @@ -26,7 +26,7 @@ import CreateProduct from "../products/CreateProduct"; import CreateAPIKey from "../developer/CreateAPIKey"; import { DevContext } from "../developer/DevContext"; import { CodeDisplay } from "@/components/general/CodeDisplay"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; + import { faBuilding, faExternalLinkAlt, @@ -34,8 +34,12 @@ import { import { useAxiosInstance } from "@/services/useAxiosInstance"; import { CopyPublishableKey } from "../developer/DevView"; import { useEnv } from "@/utils/envUtils"; -import LoadingScreen from "../general/LoadingScreen"; -import { navigateTo } from "@/utils/genUtils"; +import { + ArrowUpRight, + ArrowUpRightFromSquare, + Book, + Building, +} from "lucide-react"; function OnboardingView() { const env = useEnv(); @@ -178,9 +182,7 @@ function OnboardingView() { onClick={handleCreateOrg} isLoading={loading} variant="gradientPrimary" - startIcon={ - - } + startIcon={} > Create Organization @@ -229,9 +231,9 @@ function OnboardingView() { rel="noopener noreferrer" > Stripe Test Key - {" "} @@ -462,10 +464,7 @@ window.location.href = checkoutUrl; rel="noopener noreferrer" > Documentation - + {" "} to learn more about what you can do with Autumn.

diff --git a/vite/src/views/products/ProductRowToolbar.tsx b/vite/src/views/products/ProductRowToolbar.tsx index 467545761..37d01d0f4 100644 --- a/vite/src/views/products/ProductRowToolbar.tsx +++ b/vite/src/views/products/ProductRowToolbar.tsx @@ -1,6 +1,5 @@ import SmallSpinner from "@/components/general/SmallSpinner"; import { faClone, faPencil, faTrash } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { DropdownMenu, @@ -11,7 +10,7 @@ import { import { useState } from "react"; import { toast } from "sonner"; -import { AppEnv, Product } from "@autumn/shared"; +import { Product } from "@autumn/shared"; import { ProductService } from "@/services/products/ProductService"; import { useProductsContext } from "./ProductsContext"; import { useAxiosInstance } from "@/services/useAxiosInstance"; @@ -20,6 +19,7 @@ import { ToolbarButton } from "@/components/general/table-components/ToolbarButt import { Dialog, DialogTrigger } from "@/components/ui/dialog"; import { UpdateProductDialog } from "./UpdateProduct"; import { CopyDialog } from "./CopyDialog"; +import { Copy, Delete, Pen } from "lucide-react"; export const ProductRowToolbar = ({ product, @@ -84,7 +84,7 @@ export const ProductRowToolbar = ({ {copyLoading ? ( ) : ( - + )}
@@ -102,7 +102,7 @@ export const ProductRowToolbar = ({ >
Edit - +
@@ -119,7 +119,7 @@ export const ProductRowToolbar = ({ {deleteLoading ? ( ) : ( - + )} diff --git a/vite/src/views/products/ProductsView.tsx b/vite/src/views/products/ProductsView.tsx index a951f0217..9149d9798 100644 --- a/vite/src/views/products/ProductsView.tsx +++ b/vite/src/views/products/ProductsView.tsx @@ -11,8 +11,8 @@ import { ProductsTable } from "./ProductsTable"; import { CouponsTable } from "./coupons/CouponsTable"; import CreateCoupon from "./coupons/CreateCoupon"; import { ToggleDisplayButton } from "@/components/general/ToggleDisplayButton"; -import { faTicketSimple } from "@fortawesome/pro-regular-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; + +import { Ticket } from "lucide-react"; function ProductsView({ env }: { env: AppEnv }) { const [selectedProduct, setSelectedProduct] = useState(null); @@ -57,7 +57,7 @@ function ProductsView({ env }: { env: AppEnv }) { disabled={data?.coupons.length > 0} onClick={() => setShowCoupons((prev) => !prev)} > - + Coupons diff --git a/vite/src/views/products/coupons/CouponConfig.tsx b/vite/src/views/products/coupons/CouponConfig.tsx index c4351148e..60d2ce65c 100644 --- a/vite/src/views/products/coupons/CouponConfig.tsx +++ b/vite/src/views/products/coupons/CouponConfig.tsx @@ -26,11 +26,9 @@ import { CommandItem, CommandList, } from "@/components/ui/command"; -import { Check, ChevronsUpDown, Trash2 } from "lucide-react"; -import { cn } from "@/lib/utils"; +import { Check, ChevronsUpDown, Trash2, X } from "lucide-react"; + import { Button } from "@/components/ui/button"; -import { faCheck, faXmark } from "@fortawesome/pro-regular-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { ScrollArea } from "@/components/ui/scroll-area"; export const CouponConfig = ({ @@ -233,7 +231,7 @@ const ProductPriceSelector = ({ }} className="bg-transparent hover:bg-transparent p-0 w-5 h-5" > - + ))} @@ -258,44 +256,34 @@ const ProductPriceSelector = ({ }} className="cursor-pointer" > - {/* - setCoupon({ ...coupon, apply_to_all: checked === true }) - } - className="text-white" - /> */}

Apply to all products

{coupon.apply_to_all && ( - + )} {!coupon.apply_to_all && products.map((product: any) => ( - {product.prices?.map((price: any) => ( - handlePriceToggle(price.id)} - className="cursor-pointer" - > -
{price.name}
- {coupon.price_ids.includes(price.id) && ( - - )} + {product.prices.length > 0 ? ( + product.prices?.map((price: any) => ( + handlePriceToggle(price.id)} + className="cursor-pointer" + > +
{price.name}
+ {coupon.price_ids.includes(price.id) && ( + + )} +
+ )) + ) : ( + +

No prices available

- ))} + )}
))} diff --git a/vite/src/views/products/coupons/CouponRowToolbar.tsx b/vite/src/views/products/coupons/CouponRowToolbar.tsx index d0322efba..3dfe31004 100644 --- a/vite/src/views/products/coupons/CouponRowToolbar.tsx +++ b/vite/src/views/products/coupons/CouponRowToolbar.tsx @@ -1,7 +1,5 @@ import SmallSpinner from "@/components/general/SmallSpinner"; -import { faEllipsisVertical, faTrash } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { cn } from "@/lib/utils"; + import { DropdownMenu, DropdownMenuTrigger, @@ -10,7 +8,6 @@ import { } from "@/components/ui/dropdown-menu"; import { useState } from "react"; import { toast } from "sonner"; -import { Button } from "@/components/ui/button"; import { useAxiosInstance } from "@/services/useAxiosInstance"; import { Coupon } from "@autumn/shared"; @@ -18,6 +15,7 @@ import { getBackendErr } from "@/utils/genUtils"; import { useProductsContext } from "../ProductsContext"; import { CouponService } from "@/services/products/CouponService"; import { ToolbarButton } from "@/components/general/table-components/ToolbarButton"; +import { Delete } from "lucide-react"; export const CouponRowToolbar = ({ className, @@ -66,7 +64,7 @@ export const CouponRowToolbar = ({ {deleteLoading ? ( ) : ( - + )} diff --git a/vite/src/views/products/product/EditFreeTrialToolbar.tsx b/vite/src/views/products/product/EditFreeTrialToolbar.tsx index 7b5e96977..2096fd311 100644 --- a/vite/src/views/products/product/EditFreeTrialToolbar.tsx +++ b/vite/src/views/products/product/EditFreeTrialToolbar.tsx @@ -1,6 +1,5 @@ import SmallSpinner from "@/components/general/SmallSpinner"; -import { faEllipsisVertical, faTrash } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; + import { cn } from "@/lib/utils"; import { DropdownMenu, @@ -15,6 +14,7 @@ import { Product } from "@autumn/shared"; import { useNavigate } from "react-router"; import { useAxiosInstance } from "@/services/useAxiosInstance"; import { useProductContext } from "./ProductContext"; +import { Delete, EllipsisVertical } from "lucide-react"; export const EditFreeTrialToolbar = ({ className, @@ -42,7 +42,7 @@ export const EditFreeTrialToolbar = ({ dim={6} className={cn("rounded-full", className)} > - + @@ -59,7 +59,7 @@ export const EditFreeTrialToolbar = ({ {deleteLoading ? ( ) : ( - + )} diff --git a/vite/src/views/products/product/EditProductToolbar.tsx b/vite/src/views/products/product/EditProductToolbar.tsx index 456bd32c1..021c7de60 100644 --- a/vite/src/views/products/product/EditProductToolbar.tsx +++ b/vite/src/views/products/product/EditProductToolbar.tsx @@ -1,6 +1,4 @@ import SmallSpinner from "@/components/general/SmallSpinner"; -import { faTrash } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { cn } from "@/lib/utils"; import { DropdownMenu, @@ -13,12 +11,13 @@ import { toast } from "sonner"; import { Button } from "@/components/ui/button"; import { Product } from "@autumn/shared"; -import { faCog } from "@fortawesome/pro-duotone-svg-icons"; + import { ProductService } from "@/services/products/ProductService"; import { useNavigate } from "react-router"; import { useAxiosInstance } from "@/services/useAxiosInstance"; import { useProductContext } from "./ProductContext"; import { navigateTo } from "@/utils/genUtils"; +import { Delete, Settings } from "lucide-react"; export const EditProductToolbar = ({ className, @@ -54,7 +53,7 @@ export const EditProductToolbar = ({ dim={6} className={cn("rounded-full", className)} > - + @@ -68,11 +67,7 @@ export const EditProductToolbar = ({ >
Delete - {deleteLoading ? ( - - ) : ( - - )} + {deleteLoading ? : }
diff --git a/vite/src/views/products/product/prices/CreateFixedPrice.tsx b/vite/src/views/products/product/prices/CreateFixedPrice.tsx index 3c55e4995..13d113137 100644 --- a/vite/src/views/products/product/prices/CreateFixedPrice.tsx +++ b/vite/src/views/products/product/prices/CreateFixedPrice.tsx @@ -9,10 +9,7 @@ import { SelectValue, } from "@/components/ui/select"; import { keyToTitle } from "@/utils/formatUtils/formatTextUtils"; -import { Button } from "@/components/ui/button"; -import { Plus, X } from "lucide-react"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faPlus, faXmark } from "@fortawesome/pro-solid-svg-icons"; + import FieldLabel from "@/components/general/modal-components/FieldLabel"; import { useProductContext } from "../ProductContext"; diff --git a/vite/src/views/products/product/prices/CreateUsagePrice.tsx b/vite/src/views/products/product/prices/CreateUsagePrice.tsx index fd3dce0f4..9182190c8 100644 --- a/vite/src/views/products/product/prices/CreateUsagePrice.tsx +++ b/vite/src/views/products/product/prices/CreateUsagePrice.tsx @@ -21,12 +21,11 @@ import { useEffect } from "react"; import { keyToTitleFirstCaps } from "@/utils/formatUtils/formatTextUtils"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; -import { faXmark } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useProductContext } from "../ProductContext"; import { getFeature } from "@/utils/product/entitlementUtils"; import { getBillingUnits } from "@/utils/product/priceUtils"; import { Checkbox } from "@/components/ui/checkbox"; +import { X } from "lucide-react"; function CreateUsagePrice({ config, @@ -327,7 +326,7 @@ function CreateUsagePrice({ onClick={() => handleRemoveTier(index)} dim={6} > - + )} diff --git a/vite/src/views/products/product/prices/PriceToolbar.tsx b/vite/src/views/products/product/prices/PriceToolbar.tsx index 6d623fbe9..ff0a4e6b5 100644 --- a/vite/src/views/products/product/prices/PriceToolbar.tsx +++ b/vite/src/views/products/product/prices/PriceToolbar.tsx @@ -1,6 +1,5 @@ import SmallSpinner from "@/components/general/SmallSpinner"; -import { faEllipsisVertical, faTrash } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; + import { DropdownMenu, DropdownMenuTrigger, @@ -16,6 +15,7 @@ import { PriceService } from "@/services/products/PriceService"; import { useNavigate } from "react-router"; import { useProductContext } from "../ProductContext"; import { cn } from "@/lib/utils"; +import { Delete, EllipsisVertical } from "lucide-react"; export const PriceToolbar = ({ className, @@ -54,7 +54,7 @@ export const PriceToolbar = ({ dim={6} className={cn("rounded-full", className)} > - + @@ -71,7 +71,7 @@ export const PriceToolbar = ({ {deleteLoading ? ( ) : ( - + )}