feat(web): wire feature flag checks into Dashboard UI

Gate Focus Mode and Routines nav links behind focus_mode_enabled
and routines_enabled flags. Fix inverted routines_disabled check
to use the actual seeded flag key routines_enabled.
This commit is contained in:
saravanakumardb1 2026-03-21 20:30:49 -07:00
parent 09310b7eb8
commit a606617c1d

View File

@ -163,16 +163,18 @@ export function Dashboard() {
> >
{theme === 'dark' ? <Sun size={18} /> : <Moon size={18} />} {theme === 'dark' ? <Sun size={18} /> : <Moon size={18} />}
</button> </button>
<Link {isFlagEnabled('focus_mode_enabled') ? (
href="/focus" <Link
className="p-2 rounded-lg transition-colors" href="/focus"
style={{ color: 'var(--cm-text-tertiary)' }} className="p-2 rounded-lg transition-colors"
title="Focus Mode" style={{ color: 'var(--cm-text-tertiary)' }}
aria-label="Focus Mode" title="Focus Mode"
> aria-label="Focus Mode"
<Eye size={18} /> >
</Link> <Eye size={18} />
{isFlagEnabled('routines_disabled') ? null : ( </Link>
) : null}
{isFlagEnabled('routines_enabled') ? (
<Link <Link
href="/routines" href="/routines"
className="p-2 rounded-lg transition-colors" className="p-2 rounded-lg transition-colors"
@ -181,7 +183,7 @@ export function Dashboard() {
> >
<ListChecks size={18} /> <ListChecks size={18} />
</Link> </Link>
)} ) : null}
<Link <Link
href="/history" href="/history"
className="p-2 rounded-lg transition-colors" className="p-2 rounded-lg transition-colors"