UI enhancement
This commit is contained in:
parent
53922952c6
commit
1a15409b2d
6 changed files with 295 additions and 214 deletions
|
|
@ -64,7 +64,7 @@ function SidebarSection({ title, children, className = "" }) {
|
|||
}
|
||||
|
||||
function NavBadge({ value }) {
|
||||
if (!value) return null;
|
||||
if (!value || value <= 0) return null;
|
||||
return <em>{value}</em>;
|
||||
}
|
||||
|
||||
|
|
@ -86,6 +86,7 @@ export default function DashboardPage() {
|
|||
starred: 0,
|
||||
important: 0,
|
||||
drafts: 0,
|
||||
actionItems: 0,
|
||||
labels: {},
|
||||
});
|
||||
const handleStats = useCallback((stats) => setMailStats(stats), []);
|
||||
|
|
@ -237,7 +238,7 @@ export default function DashboardPage() {
|
|||
type="button"
|
||||
onClick={() => selectMailItem(label)}
|
||||
>
|
||||
<ItemIcon size={15} />
|
||||
<ItemIcon size={16} strokeWidth={1.75} />
|
||||
<span>{label}</span>
|
||||
<NavBadge value={countKey ? mailStats[countKey] : 0} />
|
||||
</button>
|
||||
|
|
@ -271,8 +272,9 @@ export default function DashboardPage() {
|
|||
type="button"
|
||||
onClick={() => selectAgentItem(label, actionKey)}
|
||||
>
|
||||
<ItemIcon size={15} />
|
||||
<ItemIcon size={16} strokeWidth={1.75} />
|
||||
<span>{label}</span>
|
||||
<NavBadge value={actionKey === "actions" ? mailStats.actionItems : 0} />
|
||||
</button>
|
||||
))}
|
||||
</nav>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue