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.

fix links and button sizes

Steven Tey4cc6697cd364
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/messages/[partnerId]/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/messages/[partnerId]/page-client.tsx
index 91573a9925..5674d1d0ab 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/messages/[partnerId]/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/messages/[partnerId]/page-client.tsx
@@ -19,6 +19,7 @@ import { Button } from "@dub/ui";
import { ChevronLeft, LoadingSpinner } from "@dub/ui/icons";
import { OG_AVATAR_URL, cn } from "@dub/utils";
import { useAction } from "next-safe-action/hooks";
+import Link from "next/link";
import { redirect, useParams } from "next/navigation";
import { useState } from "react";
import { toast } from "sonner";
@@ -214,17 +215,13 @@ export function ProgramMessagesPartnerPageClient() {
Profile
</h2>
<div className="flex items-center gap-2">
- <Button
- variant="secondary"
- text="View profile"
- className="h-8 rounded-lg px-3"
- onClick={() =>
- window.open(
- `/${workspaceSlug}/program/partners?partnerId=${partnerId}`,
- "_blank",
- )
- }
- />
+ <Link href={`/program/partners/${partnerId}`} target="_blank">
+ <Button
+ variant="secondary"
+ text="View profile"
+ className="h-8 rounded-lg px-3"
+ />
+ </Link>
<button
type="button"
onClick={() => setIsRightPanelOpen(false)}
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/[partnerId]/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/[partnerId]/layout.tsx
index 927c46251e..fff5e6650c 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/[partnerId]/layout.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/[partnerId]/layout.tsx
@@ -9,13 +9,7 @@ import { useBanPartnerModal } from "@/ui/partners/ban-partner-modal";
import { usePartnerAdvancedSettingsModal } from "@/ui/partners/partner-advanced-settings-modal";
import { useUnbanPartnerModal } from "@/ui/partners/unban-partner-modal";
import { ThreeDots } from "@/ui/shared/icons";
-import {
- Button,
- MenuItem,
- Popover,
- buttonVariants,
- useKeyboardShortcut,
-} from "@dub/ui";
+import { Button, MenuItem, Popover, useKeyboardShortcut } from "@dub/ui";
import {
ChevronRight,
InvoiceDollar,
@@ -25,7 +19,6 @@ import {
UserDelete,
Users,
} from "@dub/ui/icons";
-import { cn } from "@dub/utils";
import Link from "next/link";
import { useParams } from "next/navigation";
import { ReactNode, useState } from "react";
@@ -128,19 +121,17 @@ function PageControls({ partner }: { partner: EnrolledPartnerProps }) {
text="Send commission"
shortcut="C"
onClick={() => setCreateCommissionSheetOpen(true)}
- className="hidden w-fit md:flex"
+ className="hidden h-8 w-fit px-3 sm:h-9 md:flex"
/>
- <Link
- href={`/program/messages?partnerId=${partner.id}`}
- target="_blank"
- className={cn(
- buttonVariants({ variant: "secondary" }),
- "hidden h-10 items-center gap-2 rounded-md border px-4 text-sm md:flex",
- )}
- >
- <Msgs className="size-4 shrink-0" />
- Message
+ <Link href={`/program/messages/${partner.id}`}>
+ <Button
+ variant="secondary"
+ text="Message"
+ icon={<Msgs className="size-4 shrink-0" />}
+ onClick={() => setIsOpen(false)}
+ className="hidden h-8 w-fit px-3 sm:h-9 md:flex"
+ />
</Link>
<Popover
@@ -206,8 +197,8 @@ function PageControls({ partner }: { partner: EnrolledPartnerProps }) {
<Button
type="button"
variant="secondary"
- icon={<ThreeDots className="size-5 text-neutral-500" />}
- className="w-fit px-1.5"
+ icon={<ThreeDots className="size-4 text-neutral-500" />}
+ className="h-8 w-auto px-1.5 sm:h-9"
/>
</Popover>
</>
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/import-export-buttons.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/import-export-buttons.tsx
index 47dd3558b6..ba4325a131 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/import-export-buttons.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/import-export-buttons.tsx
@@ -93,7 +93,7 @@ export function ImportExportButtons() {
onClick={() => setOpenPopover(!openPopover)}
variant="secondary"
className="h-8 w-auto px-1.5 sm:h-9"
- icon={<ThreeDots className="h-5 w-5 text-neutral-500" />}
+ icon={<ThreeDots className="size-4 text-neutral-500" />}
/>
</Popover>
</>
diff --git a/packages/email/src/templates/new-message-from-partner.tsx b/packages/email/src/templates/new-message-from-partner.tsx
index f5e481e056..faa99c5ac9 100644
--- a/packages/email/src/templates/new-message-from-partner.tsx
+++ b/packages/email/src/templates/new-message-from-partner.tsx
@@ -65,7 +65,7 @@ export default function NewMessageFromPartner({
</Heading>
<Link
className="text-[13px] font-medium text-neutral-500 underline"
- href={`https://app.dub.co/${workspaceSlug}/program/partners?partnerId=${partner.id}`}
+ href={`https://app.dub.co/${workspaceSlug}/program/partners/${partner.id}`}
>
View profile in Dub
</Link>