Skip to content

Commit

Permalink
fix(search): Use MUI Link instead of <a> for search secondary title
Browse files Browse the repository at this point in the history
  • Loading branch information
Ldoppea authored and cballevre committed Nov 14, 2024
1 parent 13f29a9 commit f5e197e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/assistant/ResultMenu/SuggestionItemTextSecondary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import React from 'react'
import AppLinker from 'cozy-ui/transpiled/react/AppLinker'
import SuggestionItemTextHighlighted from './SuggestionItemTextHighlighted'
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'

import styles from './styles.styl'
import Link from 'cozy-ui/transpiled/react/Link'

const SuggestionItemTextSecondary = ({ text, query, url, slug }) => {
const { isMobile } = useBreakpoints()
Expand All @@ -22,8 +21,9 @@ const SuggestionItemTextSecondary = ({ text, query, url, slug }) => {
return (
<AppLinker app={app} href={url}>
{({ href, onClick }) => (
<a
className={styles['suggestion-item-parent-link']}
<Link
color="textSecondary"
underline="hover"
href={href}
onClick={e => {
e.stopPropagation()
Expand All @@ -37,7 +37,7 @@ const SuggestionItemTextSecondary = ({ text, query, url, slug }) => {
query={query}
slug={slug}
/>
</a>
</Link>
)}
</AppLinker>
)
Expand Down
7 changes: 0 additions & 7 deletions src/assistant/ResultMenu/styles.styl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,3 @@
&-inner
max-height 16.5rem
overflow auto

.suggestion-item-parent-link
color var(--primaryTextColor)
text-decoration none

&:hover
text-decoration underline

0 comments on commit f5e197e

Please sign in to comment.