minor
This commit is contained in:
parent
49f7d4efc1
commit
da7c98afab
|
@ -17,11 +17,11 @@ type Props = {
|
||||||
|
|
||||||
export const Link = (props: Props) => {
|
export const Link = (props: Props) => {
|
||||||
const { page } = useRouter()
|
const { page } = useRouter()
|
||||||
const isSelected = page().route === props.routeName
|
const isSelected = page()?.route === props.routeName
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
onClick={props.onClick}
|
onClick={props.onClick}
|
||||||
classList={{ 'view-switcher__item--selected': page().route === props.routeName }}
|
classList={{ 'view-switcher__item--selected': page()?.route === props.routeName }}
|
||||||
>
|
>
|
||||||
<ConditionalWrapper
|
<ConditionalWrapper
|
||||||
condition={!isSelected && Boolean(props.routeName)}
|
condition={!isSelected && Boolean(props.routeName)}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user