Fix comparison badge to update in real-time across components
- Move comparison state from hook to shared context provider - All components now share the same state instance - Badge count updates immediately when schools are added/removed - Add key prop to badge to re-trigger animation on count change - Add storage event listener for cross-tab synchronization Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,7 +48,9 @@ export function Navigation() {
|
||||
>
|
||||
Compare
|
||||
{selectedSchools.length > 0 && (
|
||||
<span className={styles.badge}>{selectedSchools.length}</span>
|
||||
<span key={selectedSchools.length} className={styles.badge}>
|
||||
{selectedSchools.length}
|
||||
</span>
|
||||
)}
|
||||
</Link>
|
||||
<Link
|
||||
|
||||
Reference in New Issue
Block a user