feat: conditionally render refresh button in ManagerWeeklySummary component

- Wrapped the refresh button in a conditional check to only display when the active view is not 'metrics', improving UI clarity and preventing unnecessary actions in the metrics view.
This commit is contained in:
Julien Froidefond
2025-10-04 10:48:20 +02:00
parent 34f1a62435
commit 052b2c2c66
2 changed files with 10 additions and 8 deletions

View File

@@ -53,13 +53,15 @@ export default function ManagerWeeklySummary({ initialSummary }: ManagerWeeklySu
<h1 className="text-2xl font-bold text-[var(--foreground)]">👔 Weekly</h1>
<p className="text-[var(--muted-foreground)]">{formatPeriod()}</p>
</div>
<Button
onClick={handleRefresh}
variant="secondary"
size="sm"
>
🔄 Actualiser
</Button>
{activeView !== 'metrics' && (
<Button
onClick={handleRefresh}
variant="secondary"
size="sm"
>
🔄 Actualiser
</Button>
)}
</div>
{/* Navigation des vues */}