Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

formateDateTime as title

Steven Tey2362897f6c2b
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/sale-table.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/sale-table.tsx
index ee4baf60d8..5f1d55f6b6 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/sale-table.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/sale-table.tsx
@@ -24,6 +24,7 @@ import {
DICEBEAR_AVATAR_URL,
fetcher,
formatDate,
+ formatDateTime,
} from "@dub/utils";
import { useParams } from "next/navigation";
import { memo } from "react";
@@ -73,7 +74,11 @@ const SaleTableBusinessInner = memo(
{
id: "createdAt",
header: "Date",
- accessorFn: (d) => formatDate(d.createdAt, { month: "short" }),
+ cell: ({ row }) => (
+ <p title={formatDateTime(row.original.createdAt)}>
+ {formatDate(row.original.createdAt, { month: "short" })}
+ </p>
+ ),
},
{
header: "Customer",
diff --git a/apps/web/app/app.dub.co/embed/sales.tsx b/apps/web/app/app.dub.co/embed/sales.tsx
index 3bd314a827..d92f252268 100644
--- a/apps/web/app/app.dub.co/embed/sales.tsx
+++ b/apps/web/app/app.dub.co/embed/sales.tsx
@@ -1,7 +1,12 @@
import { SALES_PAGE_SIZE } from "@/lib/partners/constants";
import { PartnerSaleResponse } from "@/lib/types";
import { Gift, Table, usePagination, useTable } from "@dub/ui";
-import { currencyFormatter, fetcher, formatDate } from "@dub/utils";
+import {
+ currencyFormatter,
+ fetcher,
+ formatDate,
+ formatDateTime,
+} from "@dub/utils";
import useSWR from "swr";
export function EmbedSales({ salesCount }: { salesCount: number }) {
@@ -28,9 +33,11 @@ export function EmbedSales({ salesCount }: { salesCount: number }) {
{
id: "createdAt",
header: "Date",
- cell: ({ row }) => {
- return formatDate(row.original.createdAt, { month: "short" });
- },
+ cell: ({ row }) => (
+ <p title={formatDateTime(row.original.createdAt)}>
+ {formatDate(row.original.createdAt, { month: "short" })}
+ </p>
+ ),
},
{
id: "saleAmount",
diff --git a/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/sales/sale-table.tsx b/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/sales/sale-table.tsx
index 06e8fa599a..6945a80a40 100644
--- a/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/sales/sale-table.tsx
+++ b/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/sales/sale-table.tsx
@@ -13,7 +13,12 @@ import {
useTable,
} from "@dub/ui";
import { CircleDollar } from "@dub/ui/icons";
-import { currencyFormatter, fetcher, formatDate } from "@dub/utils";
+import {
+ currencyFormatter,
+ fetcher,
+ formatDate,
+ formatDateTime,
+} from "@dub/utils";
import useSWR from "swr";
export function SaleTablePartner({ limit }: { limit?: number }) {
@@ -52,9 +57,11 @@ export function SaleTablePartner({ limit }: { limit?: number }) {
id: "createdAt",
header: "Date",
accessorKey: "timestamp",
- cell: ({ row }) => {
- return formatDate(row.original.createdAt, { month: "short" });
- },
+ cell: ({ row }) => (
+ <p title={formatDateTime(row.original.createdAt)}>
+ {formatDate(row.original.createdAt, { month: "short" })}
+ </p>
+ ),
},
{
id: "customer",