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.

prioritize bottomContent over newsContent

Steven Tey7a7beca0a5fb
diff --git a/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx b/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
index 0cf1668036..f751d90849 100644
--- a/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
+++ b/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
@@ -675,10 +675,12 @@ export function AppSidebarNav({
switcher={<WorkspaceDropdown />}
toolContent={toolContent}
bottomContent={
- <>
- <div className="px-3 pb-2">{AppBottomContent}</div>
- {freePlanOrTrial && <SidebarUsage />}
- </>
+ AppBottomContent || freePlanOrTrial ? (
+ <>
+ <div className="px-3 pb-2">{AppBottomContent}</div>
+ {freePlanOrTrial && <SidebarUsage />}
+ </>
+ ) : undefined
}
newsContent={
currentArea === "program" &&
@@ -687,7 +689,7 @@ export function AppSidebarNav({
<SpecialNewsContent />
) : !freePlanOrTrial && currentArea === "links" ? (
newsContent
- ) : null
+ ) : undefined
}
/>
);
diff --git a/apps/web/ui/layout/sidebar/sidebar-nav.tsx b/apps/web/ui/layout/sidebar/sidebar-nav.tsx
index 46e48c12a8..57bc28ce32 100644
--- a/apps/web/ui/layout/sidebar/sidebar-nav.tsx
+++ b/apps/web/ui/layout/sidebar/sidebar-nav.tsx
@@ -262,8 +262,7 @@ function SidebarAreasPanel<T extends Record<any, any>>({
height
className="flex flex-shrink-0 flex-col gap-2 rounded-b-xl"
>
- {bottomContent}
- {newsContent}
+ {bottomContent ? bottomContent : newsContent}
</AnimatedSizeContainer>
</div>
);