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:
@@ -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 */}
|
||||
|
||||
Reference in New Issue
Block a user