mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
fix: Show sidebar favorites empty state for discoverability (#2061)
This commit is contained in:
parent
2570ff844c
commit
7d1a8e549a
2 changed files with 33 additions and 4 deletions
5
.changeset/calm-foxes-fly.md
Normal file
5
.changeset/calm-foxes-fly.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@hyperdx/app": patch
|
||||
---
|
||||
|
||||
fix: Show sidebar favorites empty state when none are starred yet
|
||||
|
|
@ -400,10 +400,20 @@ export default function AppNav({ fixed = false }: { fixed?: boolean }) {
|
|||
onToggle={() => setIsSavedSearchExpanded(!isSavedSearchExpanded)}
|
||||
/>
|
||||
|
||||
{!isCollapsed && !!favoritedSavedSearches.length && (
|
||||
{!isCollapsed && (
|
||||
<Collapse in={isSavedSearchExpanded}>
|
||||
<div className={styles.subMenu}>
|
||||
{favoritedSavedSearches.map(renderSavedSearchLink)}
|
||||
{favoritedSavedSearches.length > 0 ? (
|
||||
favoritedSavedSearches.map(renderSavedSearchLink)
|
||||
) : favorites != null && savedSearches != null ? (
|
||||
<Text size="xs" c="dimmed" pl="lg" pr="xs" py={4} lh={1.4}>
|
||||
No favorites. Star on{' '}
|
||||
<Anchor component={Link} href="/search/list" size="xs">
|
||||
Saved Searches
|
||||
</Anchor>
|
||||
.
|
||||
</Text>
|
||||
) : null}
|
||||
</div>
|
||||
</Collapse>
|
||||
)}
|
||||
|
|
@ -430,10 +440,24 @@ export default function AppNav({ fixed = false }: { fixed?: boolean }) {
|
|||
onToggle={() => setIsDashboardsExpanded(!isDashboardsExpanded)}
|
||||
/>
|
||||
|
||||
{!isCollapsed && !!favoritedDashboards.length && (
|
||||
{!isCollapsed && (
|
||||
<Collapse in={isDashboardsExpanded}>
|
||||
<div className={styles.subMenu}>
|
||||
{favoritedDashboards.map(renderDashboardLink)}
|
||||
{favoritedDashboards.length > 0 ? (
|
||||
favoritedDashboards.map(renderDashboardLink)
|
||||
) : favorites != null && dashboards != null ? (
|
||||
<Text size="xs" c="dimmed" pl="lg" pr="xs" py={4} lh={1.4}>
|
||||
No favorites. Star on{' '}
|
||||
<Anchor
|
||||
component={Link}
|
||||
href="/dashboards/list"
|
||||
size="xs"
|
||||
>
|
||||
Dashboards
|
||||
</Anchor>
|
||||
.
|
||||
</Text>
|
||||
) : null}
|
||||
</div>
|
||||
</Collapse>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in a new issue