Skip to content

Commit

Permalink
make sure we dont have a false classname
Browse files Browse the repository at this point in the history
  • Loading branch information
gabyzif committed Jun 6, 2024
1 parent 2284007 commit a84d8e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/navigation/MiniMap/SvgLinker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export const SvgLinker = (props: ISvgLinkerProps) => {
const link = props.links.find(b => b.elementId === id)

if (link) {
const isActiveClass = link.isActive && ' svg-linker-root__button--active'
const isUnauthorizedClass = link.isUnauthorized && ' svg-linker-root__button--disabled'
const isActiveClass = link.isActive ? ' svg-linker-root__button--active' : ''
const isUnauthorizedClass = link.isUnauthorized ? ' svg-linker-root__button--disabled' : ''
const linkStateClass = isActiveClass || isUnauthorizedClass

const className = `svg-linker-root__button svg-linker-root__button--${link.variant} ${linkStateClass} `
Expand Down

0 comments on commit a84d8e3

Please sign in to comment.