DAILY THOUGHTS CONTINUED:
- Okay so Iām kinda going through all the components and trying to simplify and reorder things according to the needs of the theme Iām working on, and also as a way of better understanding and learning the specifics of how things work in Frontity.
In the nav the menu links look like this in the mars theme:
<Item key={name} isSelected={state.router.link === link}>
<Link link={link}>{name}</Link>
</Item>
I decided I wanted to simplify it down to just Link so that I didnāt get unnecessary extra layers. So I try this:
<Link key={name} isSelected={state.router.link === link} link={link}>
{name}
</Link>
But it does not work 
Not sure why.
When I print {state.router.link} the result I get is ā/about-us/ā and when I print {link} I get ā/about-usā.
Iāve tried to add an extra slash on the end of the {link} in the comparison but that also does not work even though I get identical prints from link and state.router.link when I do that.
-------EDIT:
Okay Iāve tried to simplify it even more. Still isnāt working consistently. When the menu item for the frontpage is selected then it is blue but when the about-us page is selected it remains purple.
const Nav = ({ state }) => (
<NavList className="nav-list">
{state.theme.menu.map(([name, link]) => (
<NavItem key={name} isSelected={state.router.link === link} link={link}>
{name}
</NavItem>
))}
</NavList>
);
export default connect(Nav);
const NavList = styled.nav`
display: flex;
box-sizing: border-box;
padding: 0 24px;
margin: 0;
overflow-x: auto;
`;
const NavItem = styled(Link)`
transition: all 0.25s 250ms cubic-bezier(0.6, -0.28, 0.735, 0.045);
color: ${({ isSelected }) => (isSelected ? "blue" : "purple")} !important;
border-bottom: 3px solid transparent;
padding: 0.1em 0.25em 0 0.25em;
margin: auto 0.25em;
&:hover {
border-bottom: 3px solid #1f38c5;
transition: all 0.25s 250ms cubic-bezier(0.6, -0.28, 0.735, 0.045);
}
`;


Iām double checking stuff via google and the error message but not sure what the cause is:


Is there any way we can reproduce it to know if it is a bug?.



