Skip to content

Commit

Permalink
Merge pull request #209 from cisagov/rsc-fix-sidenav-hashlink
Browse files Browse the repository at this point in the history
Fix RSC Side Nav hash-links
  • Loading branch information
nickviola authored Apr 30, 2024
2 parents 32caf68 + 19e62d7 commit 9398d85
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
22 changes: 10 additions & 12 deletions frontend/src/components/ReadySetCyber/FloatingNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,16 @@ export const FloatingNav: React.FC<Props> = ({ categories }) => {
>
{categories.map((category, index) => (
<div key={index}>
<MenuItem onClick={handleClose}>
<HashLink
style={{
textDecoration: 'none',
color: 'black',
outline: 'none'
}}
to={`#${category.name}`}
>
{category.name}
</HashLink>
</MenuItem>
<HashLink
style={{
textDecoration: 'none',
color: 'black',
outline: 'none'
}}
to={`#${category.name}`}
>
<MenuItem onClick={handleClose}>{category.name}</MenuItem>
</HashLink>
<Divider />
</div>
))}
Expand Down
18 changes: 11 additions & 7 deletions frontend/src/components/ReadySetCyber/RSCNavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ export const RSCNavItem: React.FC<Props> = (props) => {
const { name } = props;

return (
<ListItemButton divider style={{ outline: 'none' }}>
<HashLink
style={{ textDecoration: 'none', color: 'black', outline: 'none' }}
to={`#${name}`}
>
<HashLink
style={{
textDecoration: 'none',
color: 'black',
outline: 'none'
}}
to={`#${name}`}
>
<ListItemButton divider style={{ outline: 'none' }}>
{name}
</HashLink>
</ListItemButton>
</ListItemButton>
</HashLink>
);
};

0 comments on commit 9398d85

Please sign in to comment.