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.

Side nav updates

Tim Wilson75fd1f98d05f
diff --git a/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx b/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
index 5776dde698..73a9ac7260 100644
--- a/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
+++ b/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
@@ -254,12 +254,16 @@ const NAV_AREAS: SidebarNavAreas<SidebarNavData> = {
{
name: "Rewards",
icon: Gift,
- href: `/${slug}/program/rewards`,
+ href: `/${slug}/program/groups/default/rewards`,
+ arrow: true,
+ isActive: () => false,
},
{
name: "Discounts",
icon: Discount,
- href: `/${slug}/program/discounts`,
+ href: `/${slug}/program/groups/default/discounts`,
+ arrow: true,
+ isActive: () => false,
},
{
name: "Branding",
diff --git a/apps/web/ui/layout/sidebar/sidebar-nav.tsx b/apps/web/ui/layout/sidebar/sidebar-nav.tsx
index 7357940287..ff9c325e01 100644
--- a/apps/web/ui/layout/sidebar/sidebar-nav.tsx
+++ b/apps/web/ui/layout/sidebar/sidebar-nav.tsx
@@ -1,5 +1,6 @@
import {
AnimatedSizeContainer,
+ ArrowUpRight2,
BookOpen,
ChevronLeft,
ClientOnly,
@@ -30,6 +31,7 @@ export type NavItemCommon = {
exact?: boolean;
isActive?: (pathname: string, href: string) => boolean;
badge?: ReactNode;
+ arrow?: boolean;
locked?: boolean;
};
@@ -416,6 +418,9 @@ function NavItem({ item }: { item: NavItemType | NavSubItemType }) {
{items && (
<ChevronDown className="size-3.5 text-neutral-500 transition-transform duration-75 group-data-[active=true]:rotate-180" />
)}
+ {item.arrow && (
+ <ArrowUpRight2 className="text-content-default size-3.5 transition-transform duration-75 group-hover:-translate-y-px group-hover:translate-x-px" />
+ )}
</span>
</Link>
{items && (
diff --git a/packages/ui/src/icons/arrow-up-right-2.tsx b/packages/ui/src/icons/arrow-up-right-2.tsx
new file mode 100644
index 0000000000..45d0a59ad5
--- /dev/null
+++ b/packages/ui/src/icons/arrow-up-right-2.tsx
@@ -0,0 +1,20 @@
+import { SVGProps } from "react";
+
+export function ArrowUpRight2(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="24"
+ height="24"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="2"
+ viewBox="0 0 24 24"
+ {...props}
+ >
+ <path d="M7 7h10v10M7 17 17 7" />
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/index.tsx b/packages/ui/src/icons/index.tsx
index f33ec2ea8a..5e44c4ad06 100644
--- a/packages/ui/src/icons/index.tsx
+++ b/packages/ui/src/icons/index.tsx
@@ -4,6 +4,7 @@ import { LucideIcon } from "lucide-react";
import { ComponentType, SVGProps } from "react";
// custom icons
+export * from "./arrow-up-right-2";
export * from "./copy";
export * from "./crown-small";
export * from "./dub-analytics";