Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

refactor: link component

Brad Barbine5288da49db8
diff --git a/apps/carbon/app/components/Layout/Sidebar/IconSidebar.tsx b/apps/carbon/app/components/Layout/Sidebar/IconSidebar.tsx
index 5dcb74b18e..2624b5d34e 100644
--- a/apps/carbon/app/components/Layout/Sidebar/IconSidebar.tsx
+++ b/apps/carbon/app/components/Layout/Sidebar/IconSidebar.tsx
@@ -32,7 +32,7 @@ const IconSidebar = () => {
<div className="h-full border-r border-border bg-background z-10">
<div>
<TooltipProvider>
- <VStack spacing={0} className="sticky">
+ <VStack spacing={0} className="self-start sticky">
<Button
isIcon
asChild
diff --git a/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoriesTable/AccountCategoriesTable.tsx b/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoriesTable/AccountCategoriesTable.tsx
index 15a03ae280..cd2c070e12 100644
--- a/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoriesTable/AccountCategoriesTable.tsx
+++ b/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoriesTable/AccountCategoriesTable.tsx
@@ -1,5 +1,5 @@
-import { Button } from "@carbon/react";
-import { Link, MenuItem, useDisclosure } from "@chakra-ui/react";
+import { Button, Hyperlink } from "@carbon/react";
+import { MenuItem, useDisclosure } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo, useState } from "react";
@@ -43,9 +43,9 @@ const AccountCategoriesTable = memo(
accessorKey: "category",
header: "Category",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id as string)}>
+ <Hyperlink onClick={() => navigate(row.original.id as string)}>
{row.original.category}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTable/ChartOfAccountsTable.tsx b/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTable/ChartOfAccountsTable.tsx
index 921c1182bc..e59c815387 100644
--- a/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTable/ChartOfAccountsTable.tsx
+++ b/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTable/ChartOfAccountsTable.tsx
@@ -1,5 +1,4 @@
-import { Button, Checkbox, HStack, cn } from "@carbon/react";
-import { Link } from "@chakra-ui/react";
+import { Button, Checkbox, HStack, Hyperlink, cn } from "@carbon/react";
import { Link as RemixLink, useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useMemo } from "react";
@@ -23,12 +22,12 @@ const ChartOfAccountsTable = memo(({ data }: ChartOfAccountsTableProps) => {
return (
<HStack>
- <Link
+ <Hyperlink
+ className={cn(!isPosting && "font-bold")}
onClick={() => navigate(row.original.id)}
- fontWeight={isPosting ? "normal" : "bold"}
>
{row.original.number}
- </Link>
+ </Hyperlink>
<div className="relative w-6 h-6">
<Button
diff --git a/apps/carbon/app/modules/accounting/ui/Currencies/CurrenciesTable/CurrenciesTable.tsx b/apps/carbon/app/modules/accounting/ui/Currencies/CurrenciesTable/CurrenciesTable.tsx
index 406651fbbc..66ffe5a075 100644
--- a/apps/carbon/app/modules/accounting/ui/Currencies/CurrenciesTable/CurrenciesTable.tsx
+++ b/apps/carbon/app/modules/accounting/ui/Currencies/CurrenciesTable/CurrenciesTable.tsx
@@ -1,5 +1,5 @@
-import { Checkbox } from "@carbon/react";
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Checkbox, Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -26,9 +26,9 @@ const CurrenciesTable = memo(({ data, count }: CurrenciesTableProps) => {
accessorKey: "name",
header: "Name",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/accounting/ui/PaymentTerms/PaymentTermsTable/PaymentTermsTable.tsx b/apps/carbon/app/modules/accounting/ui/PaymentTerms/PaymentTermsTable/PaymentTermsTable.tsx
index 28aeeaea54..567397f8fc 100644
--- a/apps/carbon/app/modules/accounting/ui/PaymentTerms/PaymentTermsTable/PaymentTermsTable.tsx
+++ b/apps/carbon/app/modules/accounting/ui/PaymentTerms/PaymentTermsTable/PaymentTermsTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -25,9 +26,9 @@ const PaymentTermsTable = memo(({ data, count }: PaymentTermsTableProps) => {
accessorKey: "name",
header: "Name",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/documents/ui/Documents/DocumentsTable/DocumentsTable.tsx b/apps/carbon/app/modules/documents/ui/Documents/DocumentsTable/DocumentsTable.tsx
index 95282dda7e..34641dff84 100644
--- a/apps/carbon/app/modules/documents/ui/Documents/DocumentsTable/DocumentsTable.tsx
+++ b/apps/carbon/app/modules/documents/ui/Documents/DocumentsTable/DocumentsTable.tsx
@@ -3,6 +3,7 @@ import {
HoverCard,
HoverCardContent,
HoverCardTrigger,
+ Hyperlink,
Popover,
PopoverContent,
PopoverTrigger,
@@ -11,7 +12,6 @@ import {
import { convertKbToString } from "@carbon/utils";
import {
Icon,
- Link,
MenuItem,
Tag,
TagCloseButton,
@@ -156,7 +156,7 @@ const DocumentsTable = memo(({ data, count, labels }: DocumentsTableProps) => {
onClick={() => onFavorite(row.original)}
/>
<DocumentIcon fileName={row.original.name} />
- <Link onClick={() => download(row.original)}>
+ <Hyperlink onClick={() => download(row.original)}>
{row.original.type &&
(isImage(row.original.type) || isPdf(row.original.type)) ? (
<HoverCard>
@@ -191,7 +191,7 @@ const DocumentsTable = memo(({ data, count, labels }: DocumentsTableProps) => {
) : (
<>{row.original.name}</>
)}
- </Link>
+ </Hyperlink>
</HStack>
),
},
diff --git a/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptsTable/ReceiptsTable.tsx b/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptsTable/ReceiptsTable.tsx
index d425696a52..2a0f683369 100644
--- a/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptsTable/ReceiptsTable.tsx
+++ b/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptsTable/ReceiptsTable.tsx
@@ -1,5 +1,6 @@
+import { Hyperlink } from "@carbon/react";
import { formatDate } from "@carbon/utils";
-import { Link, MenuItem } from "@chakra-ui/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -31,9 +32,9 @@ const ReceiptsTable = memo(({ data, count }: ReceiptsTableProps) => {
accessorKey: "receiptId",
header: "Receipt ID",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.receiptId}
- </Link>
+ </Hyperlink>
),
},
{
@@ -49,7 +50,7 @@ const ReceiptsTable = memo(({ data, count }: ReceiptsTableProps) => {
switch (row.original.sourceDocument) {
case "Purchase Order":
return (
- <Link
+ <Hyperlink
onClick={() =>
navigate(
path.to.purchaseOrder(row.original.sourceDocumentId!)
@@ -57,11 +58,11 @@ const ReceiptsTable = memo(({ data, count }: ReceiptsTableProps) => {
}
>
{row.original.sourceDocumentReadableId}
- </Link>
+ </Hyperlink>
);
case "Purchase Invoice":
return (
- <Link
+ <Hyperlink
onClick={() =>
navigate(
path.to.purchaseInvoice(row.original.sourceDocumentId!)
@@ -69,7 +70,7 @@ const ReceiptsTable = memo(({ data, count }: ReceiptsTableProps) => {
}
>
{row.original.sourceDocumentReadableId}
- </Link>
+ </Hyperlink>
);
default:
return null;
diff --git a/apps/carbon/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTable/ShippingMethodsTable.tsx b/apps/carbon/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTable/ShippingMethodsTable.tsx
index 0d859f0eae..22dd63305a 100644
--- a/apps/carbon/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTable/ShippingMethodsTable.tsx
+++ b/apps/carbon/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTable/ShippingMethodsTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -30,9 +31,9 @@ const ShippingMethodsTable = memo(
accessorKey: "name",
header: "Name",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoices/PurchaseInvoicesTable/PurchaseInvoicesTable.tsx b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoices/PurchaseInvoicesTable/PurchaseInvoicesTable.tsx
index 1d42cf0f90..c3daaf33e4 100644
--- a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoices/PurchaseInvoicesTable/PurchaseInvoicesTable.tsx
+++ b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoices/PurchaseInvoicesTable/PurchaseInvoicesTable.tsx
@@ -1,5 +1,5 @@
-import { HStack } from "@carbon/react";
-import { Link, MenuItem, Text, useDisclosure } from "@chakra-ui/react";
+import { HStack, Hyperlink, useDisclosure } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useMemo, useState } from "react";
@@ -40,7 +40,7 @@ const PurchaseInvoicesTable = memo(
accessorKey: "invoiceId",
header: "Invoice Number",
cell: ({ row }) => (
- <Link
+ <Hyperlink
onClick={
row.original?.id !== null
? () => navigate(path.to.purchaseInvoice(row.original.id!))
@@ -48,7 +48,7 @@ const PurchaseInvoicesTable = memo(
}
>
{row.original?.invoiceId}
- </Link>
+ </Hyperlink>
),
},
{
@@ -82,7 +82,7 @@ const PurchaseInvoicesTable = memo(
return (
<HStack>
<Avatar size="sm" path={row.original.createdByAvatar} />
- <Text>{row.original.createdByFullName}</Text>
+ <span>{row.original.createdByFullName}</span>
</HStack>
);
},
@@ -99,7 +99,7 @@ const PurchaseInvoicesTable = memo(
return row.original.updatedByFullName ? (
<HStack>
<Avatar size="sm" path={row.original.updatedByAvatar ?? null} />
- <Text>{row.original.updatedByFullName}</Text>
+ <span>{row.original.updatedByFullName}</span>
</HStack>
) : null;
},
diff --git a/apps/carbon/app/modules/parts/ui/PartGroups/PartGroupsTable/PartGroupsTable.tsx b/apps/carbon/app/modules/parts/ui/PartGroups/PartGroupsTable/PartGroupsTable.tsx
index 111c1e29ed..5d88b819da 100644
--- a/apps/carbon/app/modules/parts/ui/PartGroups/PartGroupsTable/PartGroupsTable.tsx
+++ b/apps/carbon/app/modules/parts/ui/PartGroups/PartGroupsTable/PartGroupsTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -18,8 +19,6 @@ const PartGroupsTable = memo(({ data, count }: PartGroupsTableProps) => {
const [params] = useUrlParams();
const navigate = useNavigate();
const permissions = usePermissions();
- // const hasAccounting =
- // permissions.has("accounting") && permissions.can("view", "accounting");
const rows = useMemo(() => data, [data]);
@@ -29,9 +28,9 @@ const PartGroupsTable = memo(({ data, count }: PartGroupsTableProps) => {
accessorKey: "name",
header: "Name",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/parts/ui/Parts/PartsTable/PartsTable.tsx b/apps/carbon/app/modules/parts/ui/Parts/PartsTable/PartsTable.tsx
index 76d8363075..672620c363 100644
--- a/apps/carbon/app/modules/parts/ui/Parts/PartsTable/PartsTable.tsx
+++ b/apps/carbon/app/modules/parts/ui/Parts/PartsTable/PartsTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useMemo } from "react";
@@ -23,9 +24,9 @@ const PartsTable = memo(({ data, count }: PartsTableProps) => {
accessorKey: "id",
header: "Part ID",
cell: ({ row }) => (
- <Link onClick={() => navigate(path.to.part(row.original.id!))}>
+ <Hyperlink onClick={() => navigate(path.to.part(row.original.id!))}>
{row.original.id}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/parts/ui/Services/ServicesTable/ServicesTable.tsx b/apps/carbon/app/modules/parts/ui/Services/ServicesTable/ServicesTable.tsx
index 243e04191b..8574b12c5f 100644
--- a/apps/carbon/app/modules/parts/ui/Services/ServicesTable/ServicesTable.tsx
+++ b/apps/carbon/app/modules/parts/ui/Services/ServicesTable/ServicesTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useMemo } from "react";
@@ -23,9 +24,11 @@ const ServicesTable = memo(({ data, count }: ServicesTableProps) => {
accessorKey: "id",
header: "Service ID",
cell: ({ row }) => (
- <Link onClick={() => navigate(path.to.service(row.original.id!))}>
+ <Hyperlink
+ onClick={() => navigate(path.to.service(row.original.id!))}
+ >
{row.original.id}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/parts/ui/UnitOfMeasure/UnitOfMeasuresTable/UnitOfMeasuresTable.tsx b/apps/carbon/app/modules/parts/ui/UnitOfMeasure/UnitOfMeasuresTable/UnitOfMeasuresTable.tsx
index bb6090a4ff..2904be5fd2 100644
--- a/apps/carbon/app/modules/parts/ui/UnitOfMeasure/UnitOfMeasuresTable/UnitOfMeasuresTable.tsx
+++ b/apps/carbon/app/modules/parts/ui/UnitOfMeasure/UnitOfMeasuresTable/UnitOfMeasuresTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -26,9 +27,9 @@ const UnitOfMeasuresTable = memo(
accessorKey: "name",
header: "Name",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderInternalDocuments/PurchaseOrderDocuments.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderInternalDocuments/PurchaseOrderDocuments.tsx
index 6d0d866950..04dff2869f 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderInternalDocuments/PurchaseOrderDocuments.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderInternalDocuments/PurchaseOrderDocuments.tsx
@@ -5,21 +5,21 @@ import {
CardHeader,
CardTitle,
HStack,
+ Hyperlink,
+ Table,
+ Tbody,
+ Td,
+ Th,
+ Thead,
+ Tr,
} from "@carbon/react";
import { convertKbToString } from "@carbon/utils";
import {
IconButton,
- Link,
Menu,
MenuButton,
MenuItem,
MenuList,
- Table,
- Tbody,
- Td,
- Th,
- Thead,
- Tr,
} from "@chakra-ui/react";
import { Outlet } from "@remix-run/react";
import { MdMoreVert } from "react-icons/md";
@@ -67,7 +67,7 @@ const PurchaseOrderDocuments = ({
<Tr>
<Th>Name</Th>
<Th>Size</Th>
- {/* <Th>Uploaded By</Th> */}
+
<Th></Th>
</Tr>
</Thead>
@@ -78,9 +78,9 @@ const PurchaseOrderDocuments = ({
<Td>
<HStack>
<DocumentIcon fileName={attachment.name} />
- <Link onClick={() => download(attachment)}>
+ <Hyperlink onClick={() => download(attachment)}>
{attachment.name}
- </Link>
+ </Hyperlink>
</HStack>
</Td>
<Td>
@@ -88,15 +88,6 @@ const PurchaseOrderDocuments = ({
Math.floor((attachment.metadata?.size ?? 0) / 1024)
)}
</Td>
- {/* <Td>
- <HStack>
- <Avatar
- size="sm"
- path={getAvatarPath(attachment.owner) ?? null}
- />
- <Text>{getFullName(attachment.owner)}</Text>
- </HStack>
- </Td> */}
<Td>
<div className="flex justify-end w-full">
<Menu>
@@ -124,7 +115,10 @@ const PurchaseOrderDocuments = ({
))
) : (
<Tr>
- <Td colSpan={24} py={8} color="gray.500" textAlign="center">
+ <Td
+ colSpan={24}
+ className="py-8 text-muted-foreground text-center"
+ >
No {isExternal ? "external" : "internal"} attachments
</Td>
</Tr>
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrders/PurchaseOrdersTable/PurchaseOrdersTable.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrders/PurchaseOrdersTable/PurchaseOrdersTable.tsx
index 050710c735..fe97aa4a71 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrders/PurchaseOrdersTable/PurchaseOrdersTable.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrders/PurchaseOrdersTable/PurchaseOrdersTable.tsx
@@ -1,5 +1,5 @@
-import { HStack, useDisclosure } from "@carbon/react";
-import { Icon, Link, MenuItem, Text } from "@chakra-ui/react";
+import { HStack, Hyperlink, useDisclosure } from "@carbon/react";
+import { MenuItem, Text } from "@chakra-ui/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useEffect, useMemo, useState } from "react";
import { BsPencilSquare, BsStar, BsStarFill } from "react-icons/bs";
@@ -64,18 +64,21 @@ const PurchaseOrdersTable = memo(
header: "PO Number",
cell: ({ row }) => (
<HStack>
- <Icon
- color={row.original.favorite ? "yellow.400" : "gray.300"}
- cursor="pointer"
- h={4}
- w={4}
- as={row.original.favorite ? BsStarFill : BsStar}
- onClick={() => onFavorite(row.original)}
- />
+ {row.original.favorite ? (
+ <BsStarFill
+ className="text-yellow-400 cursor-pointer h-4 w-4"
+ onClick={() => onFavorite(row.original)}
+ />
+ ) : (
+ <BsStar
+ className="text-muted-foreground cursor-pointer h-4 w-4"
+ onClick={() => onFavorite(row.original)}
+ />
+ )}
- <Link onClick={() => edit(row.original)}>
+ <Hyperlink onClick={() => edit(row.original)}>
{row.original.purchaseOrderId}
- </Link>
+ </Hyperlink>
</HStack>
),
},
diff --git a/apps/carbon/app/modules/purchasing/ui/SupplierTypes/SupplierTypesTable/SupplierTypesTable.tsx b/apps/carbon/app/modules/purchasing/ui/SupplierTypes/SupplierTypesTable/SupplierTypesTable.tsx
index 8e60e68729..a886e080b1 100644
--- a/apps/carbon/app/modules/purchasing/ui/SupplierTypes/SupplierTypesTable/SupplierTypesTable.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/SupplierTypes/SupplierTypesTable/SupplierTypesTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -25,9 +26,9 @@ const SupplierTypesTable = memo(({ data, count }: SupplierTypesTableProps) => {
accessorKey: "name",
header: "Supplier Type",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id as string)}>
+ <Hyperlink onClick={() => navigate(row.original.id as string)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTable/SuppliersTable.tsx b/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTable/SuppliersTable.tsx
index 3b3b423600..8395b36d48 100644
--- a/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTable/SuppliersTable.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTable/SuppliersTable.tsx
@@ -1,5 +1,5 @@
-import { Button } from "@carbon/react";
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Button, Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useMemo } from "react";
@@ -22,9 +22,11 @@ const SuppliersTable = memo(({ data, count }: SuppliersTableProps) => {
accessorKey: "name",
header: "Name",
cell: ({ row }) => (
- <Link onClick={() => navigate(path.to.supplier(row.original.id!))}>
+ <Hyperlink
+ onClick={() => navigate(path.to.supplier(row.original.id!))}
+ >
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTable/AbilitiesTable.tsx b/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTable/AbilitiesTable.tsx
index 683e2ecd17..7f715ddf5f 100644
--- a/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTable/AbilitiesTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTable/AbilitiesTable.tsx
@@ -2,8 +2,9 @@ import {
AvatarGroup,
AvatarGroupList,
AvatarOverflowIndicator,
+ Hyperlink,
} from "@carbon/react";
-import { Link, MenuItem } from "@chakra-ui/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -66,9 +67,9 @@ const AbilitiesTable = memo(({ data, count }: AbilitiesTableProps) => {
accessorKey: "name",
header: "Ability",
cell: ({ row }) => (
- <Link onClick={() => navigate(path.to.ability(row.original.id))}>
+ <Hyperlink onClick={() => navigate(path.to.ability(row.original.id))}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx b/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx
index 5e6e4e07d5..82836726fe 100644
--- a/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx
@@ -1,5 +1,5 @@
-import { Button, useDisclosure } from "@carbon/react";
-import { Badge, Link, MenuItem } from "@chakra-ui/react";
+import { Button, Hyperlink, useDisclosure } from "@carbon/react";
+import { Badge, MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo, useState } from "react";
@@ -43,9 +43,9 @@ const AttributeCategoriesTable = memo(
accessorKey: "name",
header: "Category",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/resources/ui/Contractors/ContractorsTable/ContractorsTable.tsx b/apps/carbon/app/modules/resources/ui/Contractors/ContractorsTable/ContractorsTable.tsx
index 03c0d93a9c..1f80d7d214 100644
--- a/apps/carbon/app/modules/resources/ui/Contractors/ContractorsTable/ContractorsTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Contractors/ContractorsTable/ContractorsTable.tsx
@@ -1,5 +1,5 @@
-import { Avatar, HStack } from "@carbon/react";
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Avatar, HStack, Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -28,13 +28,13 @@ const ContractorsTable = memo(({ data, count }: ContractorsTableProps) => {
cell: ({ row }) => (
<HStack>
<Avatar size="sm" name={row.original.supplierName ?? ""} />
- <Link
+ <Hyperlink
onClick={() => {
navigate(path.to.supplier(row.original.supplierId!));
}}
>
{row.original.supplierName}
- </Link>
+ </Hyperlink>
</HStack>
),
},
diff --git a/apps/carbon/app/modules/resources/ui/Departments/DepartmentsTable/DepartmentsTable.tsx b/apps/carbon/app/modules/resources/ui/Departments/DepartmentsTable/DepartmentsTable.tsx
index 69e01d100a..4adeb93f91 100644
--- a/apps/carbon/app/modules/resources/ui/Departments/DepartmentsTable/DepartmentsTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Departments/DepartmentsTable/DepartmentsTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -33,9 +34,9 @@ const DepartmentsTable = memo(({ data, count }: DepartmentsTableProps) => {
accessorKey: "name",
header: "Department",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx b/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx
index 1cb768771d..dc30bd0c8b 100644
--- a/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx
@@ -1,5 +1,5 @@
-import { Button, HStack, useDisclosure } from "@carbon/react";
-import { Icon, Link, MenuItem } from "@chakra-ui/react";
+import { Button, HStack, Hyperlink, useDisclosure } from "@carbon/react";
+import { Icon, MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo, useState } from "react";
@@ -48,9 +48,9 @@ const EquipmentTypesTable = memo(
header: "Equipment Type",
cell: ({ row }) => (
<HStack>
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
{row.original.requiredAbility && (
<Icon
as={BsFillCheckCircleFill}
diff --git a/apps/carbon/app/modules/resources/ui/Holidays/HolidaysTable/HolidaysTable.tsx b/apps/carbon/app/modules/resources/ui/Holidays/HolidaysTable/HolidaysTable.tsx
index 8ebcbf86b1..09b0163bed 100644
--- a/apps/carbon/app/modules/resources/ui/Holidays/HolidaysTable/HolidaysTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Holidays/HolidaysTable/HolidaysTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -27,9 +28,9 @@ const HolidaysTable = memo(({ data, count }: HolidaysTableProps) => {
accessorKey: "name",
header: "Holiday",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{`${row.original.name} (${row.original.year})`}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/resources/ui/Locations/LocationsTable/LocationsTable.tsx b/apps/carbon/app/modules/resources/ui/Locations/LocationsTable/LocationsTable.tsx
index a8ae8411ee..34e5c3f01f 100644
--- a/apps/carbon/app/modules/resources/ui/Locations/LocationsTable/LocationsTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Locations/LocationsTable/LocationsTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -29,9 +30,9 @@ const LocationsTable = memo(({ data, count }: LocationsTableProps) => {
accessorKey: "name",
header: "Location",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/resources/ui/Partners/PartnersTable/PartnersTable.tsx b/apps/carbon/app/modules/resources/ui/Partners/PartnersTable/PartnersTable.tsx
index a7a8895fa5..18c572a33e 100644
--- a/apps/carbon/app/modules/resources/ui/Partners/PartnersTable/PartnersTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Partners/PartnersTable/PartnersTable.tsx
@@ -1,5 +1,5 @@
-import { Avatar, HStack } from "@carbon/react";
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Avatar, HStack, Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -33,13 +33,13 @@ const PartnersTable = memo(({ data, count }: PartnersTableProps) => {
<HStack>
<Avatar size="sm" name={row.original.supplierName ?? ""} />
- <Link
+ <Hyperlink
onClick={() => {
navigate(path.to.supplier(row?.original.supplierId!));
}}
>
{row.original.supplierName}
- </Link>
+ </Hyperlink>
</HStack>
),
},
diff --git a/apps/carbon/app/modules/resources/ui/People/PeopleTable/PeopleTable.tsx b/apps/carbon/app/modules/resources/ui/People/PeopleTable/PeopleTable.tsx
index 50a781fcbd..9df397c1e9 100644
--- a/apps/carbon/app/modules/resources/ui/People/PeopleTable/PeopleTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/People/PeopleTable/PeopleTable.tsx
@@ -1,5 +1,5 @@
-import { HStack } from "@carbon/react";
-import { Link, MenuItem, Text } from "@chakra-ui/react";
+import { HStack, Hyperlink } from "@carbon/react";
+import { MenuItem, Text } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -105,13 +105,13 @@ const PeopleTable = memo(
path={row.original.user?.avatarUrl!}
/>
- <Link
+ <Hyperlink
onClick={() => {
navigate(path.to.person(row?.original.user?.id!));
}}
>
{row.original.user?.fullName}
- </Link>
+ </Hyperlink>
</HStack>
),
},
diff --git a/apps/carbon/app/modules/resources/ui/Person/PersonAbilities/PersonAbilities.tsx b/apps/carbon/app/modules/resources/ui/Person/PersonAbilities/PersonAbilities.tsx
index c4f2cb1f7a..f04961cab0 100644
--- a/apps/carbon/app/modules/resources/ui/Person/PersonAbilities/PersonAbilities.tsx
+++ b/apps/carbon/app/modules/resources/ui/Person/PersonAbilities/PersonAbilities.tsx
@@ -1,6 +1,6 @@
import { Card, CardContent, CardHeader, CardTitle } from "@carbon/react";
import { formatDate } from "@carbon/utils";
-import { Icon, List, ListItem } from "@chakra-ui/react";
+import { List, ListItem } from "@chakra-ui/react";
import { Link } from "@remix-run/react";
import clsx from "clsx";
import type { IconType } from "react-icons";
@@ -59,6 +59,8 @@ const PersonAbilities = ({ abilities }: PersonAbilitiesProps) => {
return null;
}
+ let Icon = icon;
+
return (
<ListItem key={employeeAbility.id}>
<div className="grid-cols-[auto_1fr_auto] space-x-4">
@@ -75,7 +77,7 @@ const PersonAbilities = ({ abilities }: PersonAbilitiesProps) => {
}
)}
>
- <Icon as={icon} w={5} h={5} />
+ <Icon className="h-5 w-5" />
</div>
<div className="flex h-full items-center">
<p>
diff --git a/apps/carbon/app/modules/resources/ui/Shifts/ShiftsTable/ShiftsTable.tsx b/apps/carbon/app/modules/resources/ui/Shifts/ShiftsTable/ShiftsTable.tsx
index 0df1b54d56..0048ca70cf 100644
--- a/apps/carbon/app/modules/resources/ui/Shifts/ShiftsTable/ShiftsTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Shifts/ShiftsTable/ShiftsTable.tsx
@@ -1,4 +1,5 @@
-import { AvatarGroup, Badge, Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { AvatarGroup, Badge, MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -91,9 +92,9 @@ const ShiftsTable = memo(({ data, count }: ShiftsTableProps) => {
accessorKey: "name",
header: "Shift",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx b/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx
index 8f82bb39a1..7b0c28d68c 100644
--- a/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx
@@ -1,5 +1,5 @@
-import { Button, HStack, useDisclosure } from "@carbon/react";
-import { Icon, Link, MenuItem } from "@chakra-ui/react";
+import { Button, HStack, Hyperlink, useDisclosure } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo, useState } from "react";
@@ -45,13 +45,12 @@ const WorkCellTypesTable = memo(({ data, count }: WorkCellTypesTableProps) => {
header: "Work Cell Type",
cell: ({ row }) => (
<HStack>
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
{row.original.requiredAbility && (
- <Icon
- as={BsFillCheckCircleFill}
- color="green.500"
+ <BsFillCheckCircleFill
+ className="text-green-500"
title="Requires ability"
/>
)}
diff --git a/apps/carbon/app/modules/sales/ui/CustomerTypes/CustomerTypesTable/CustomerTypesTable.tsx b/apps/carbon/app/modules/sales/ui/CustomerTypes/CustomerTypesTable/CustomerTypesTable.tsx
index 583aaf0459..1ff3b6beb8 100644
--- a/apps/carbon/app/modules/sales/ui/CustomerTypes/CustomerTypesTable/CustomerTypesTable.tsx
+++ b/apps/carbon/app/modules/sales/ui/CustomerTypes/CustomerTypesTable/CustomerTypesTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -25,9 +26,9 @@ const CustomerTypesTable = memo(({ data, count }: CustomerTypesTableProps) => {
accessorKey: "name",
header: "Customer Type",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/sales/ui/Customers/CustomersTable/CustomersTable.tsx b/apps/carbon/app/modules/sales/ui/Customers/CustomersTable/CustomersTable.tsx
index c9a42a0df0..ffa34fefcc 100644
--- a/apps/carbon/app/modules/sales/ui/Customers/CustomersTable/CustomersTable.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customers/CustomersTable/CustomersTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useMemo } from "react";
@@ -21,9 +22,11 @@ const CustomersTable = memo(({ data, count }: CustomersTableProps) => {
accessorKey: "name",
header: "Name",
cell: ({ row }) => (
- <Link onClick={() => navigate(path.to.customer(row.original.id!))}>
+ <Hyperlink
+ onClick={() => navigate(path.to.customer(row.original.id!))}
+ >
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/settings/ui/Sequences/SequencesTable/SequencesTable.tsx b/apps/carbon/app/modules/settings/ui/Sequences/SequencesTable/SequencesTable.tsx
index cf947175f9..6ad2c00f23 100644
--- a/apps/carbon/app/modules/settings/ui/Sequences/SequencesTable/SequencesTable.tsx
+++ b/apps/carbon/app/modules/settings/ui/Sequences/SequencesTable/SequencesTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -24,9 +25,9 @@ const SequencesTable = memo(({ data, count }: SequencesTableProps) => {
accessorKey: "name",
header: "Name",
cell: ({ row }) => (
- <Link onClick={() => navigate(row.original.table)}>
+ <Hyperlink onClick={() => navigate(row.original.table)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/users/ui/EmployeeTypes/EmployeeTypesTable/EmployeeTypesTable.tsx b/apps/carbon/app/modules/users/ui/EmployeeTypes/EmployeeTypesTable/EmployeeTypesTable.tsx
index cf98c9c76b..41b9ddbf16 100644
--- a/apps/carbon/app/modules/users/ui/EmployeeTypes/EmployeeTypesTable/EmployeeTypesTable.tsx
+++ b/apps/carbon/app/modules/users/ui/EmployeeTypes/EmployeeTypesTable/EmployeeTypesTable.tsx
@@ -1,4 +1,5 @@
-import { Link, MenuItem } from "@chakra-ui/react";
+import { Hyperlink } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -28,9 +29,9 @@ const EmployeeTypesTable = memo(({ data, count }: EmployeeTypesTableProps) => {
row.original.protected ? (
getValue()
) : (
- <Link onClick={() => navigate(row.original.id)}>
+ <Hyperlink onClick={() => navigate(row.original.id)}>
{row.original.name}
- </Link>
+ </Hyperlink>
),
},
{
diff --git a/apps/carbon/app/modules/users/ui/Employees/EmployeesTable/EmployeesTable.tsx b/apps/carbon/app/modules/users/ui/Employees/EmployeesTable/EmployeesTable.tsx
index 845758f1be..e5bcc0b2e1 100644
--- a/apps/carbon/app/modules/users/ui/Employees/EmployeesTable/EmployeesTable.tsx
+++ b/apps/carbon/app/modules/users/ui/Employees/EmployeesTable/EmployeesTable.tsx
@@ -1,5 +1,5 @@
-import { HStack, useDisclosure } from "@carbon/react";
-import { Link, MenuItem } from "@chakra-ui/react";
+import { HStack, Hyperlink, useDisclosure } from "@carbon/react";
+import { MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo, useState } from "react";
@@ -65,13 +65,11 @@ const EmployeesTable = memo(
<HStack>
<Avatar
size="sm"
- // @ts-ignore
- name={row.original.user?.fullName}
- // @ts-ignore
- path={row.original.user?.avatarUrl}
+ name={row.original.user?.fullName ?? undefined}
+ path={row.original.user?.avatarUrl ?? undefined}
/>
- {/* // @ts-ignore */}
- <Link
+
+ <Hyperlink
onClick={() =>
navigate(
`${path.to.employeeAccount(
@@ -80,11 +78,8 @@ const EmployeesTable = memo(
)
}
>
- {
- // @ts-ignore
- `${row.original.user?.firstName} ${row.original.user?.lastName}`
- }
- </Link>
+ {`${row.original.user?.firstName} ${row.original.user?.lastName}`}
+ </Hyperlink>
</HStack>
),
},
diff --git a/packages/react/src/Hyperlink.tsx b/packages/react/src/Hyperlink.tsx
new file mode 100644
index 0000000000..08fee5173c
--- /dev/null
+++ b/packages/react/src/Hyperlink.tsx
@@ -0,0 +1,17 @@
+import type { ComponentPropsWithoutRef, ElementRef } from "react";
+import { forwardRef } from "react";
+import { cn } from "./utils/cn";
+
+const Hyperlink = forwardRef<ElementRef<"a">, ComponentPropsWithoutRef<"a">>(
+ ({ className, ...props }, ref) => (
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
+ <a
+ {...props}
+ ref={ref}
+ className={cn("text-primary hover:underline cursor-pointer", className)}
+ />
+ )
+);
+Hyperlink.displayName = "Hyperlink";
+
+export { Hyperlink };
diff --git a/packages/react/src/index.tsx b/packages/react/src/index.tsx
index f81949c491..ff46cf625a 100644
--- a/packages/react/src/index.tsx
+++ b/packages/react/src/index.tsx
@@ -66,6 +66,7 @@ import { HStack } from "./HStack";
import { HTML } from "./HTML";
import { Heading } from "./Heading";
import { HoverCard, HoverCardContent, HoverCardTrigger } from "./HoverCard";
+import { Hyperlink } from "./Hyperlink";
import { IconButton } from "./IconButton";
import type { InputProps } from "./Input";
import {
@@ -193,6 +194,7 @@ export {
HoverCard,
HoverCardContent,
HoverCardTrigger,
+ Hyperlink,
IconButton,
Input,
InputGroup,