Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
#729 - add list key and clean up imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescd18 committed Jun 19, 2022
1 parent ffa3662 commit d647e29
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/frontend/layouts/nav-top-bar/nav-top-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
import { Dropdown, Nav, Navbar } from 'react-bootstrap';
import { Link } from 'react-router-dom';
import { routes } from '../../../shared/routes';
import NavUserMenu from './nav-user-menu/nav-user-menu';
import NavNotificationsMenu from './nav-notifications-menu/nav-notifications-menu';
import styles from './nav-top-bar.module.css';
import { useAuth } from '../../../services/auth.hooks';
import { fullNamePipe } from '../../../shared/pipes';
import { useTheme } from '../../../services/theme.hooks';
import themes from '../../../shared/themes';
import NavUserMenu from './nav-user-menu/nav-user-menu';
import NavNotificationsMenu from './nav-notifications-menu/nav-notifications-menu';
import styles from './nav-top-bar.module.css';

const NavTopBar: React.FC = () => {
const auth = useAuth();
Expand All @@ -39,7 +39,9 @@ const NavTopBar: React.FC = () => {
{themes
.filter((t) => t.name !== theme.name)
.map((t) => (
<Dropdown.Item onClick={() => theme.toggleTheme!(t.name)}>{t.name}</Dropdown.Item>
<Dropdown.Item key={t.name} onClick={() => theme.toggleTheme!(t.name)}>
{t.name}
</Dropdown.Item>
))}
</Dropdown.Menu>
</Dropdown>
Expand Down

0 comments on commit d647e29

Please sign in to comment.