revert: entry item click logic
- Removed redundant link handling logic in the EntryItemWrapper component. - Streamlined navigation logic to improve clarity and maintainability. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
parent
4e6e63329e
commit
0f656d5ca3
|
|
@ -89,18 +89,6 @@ export const EntryItemWrapper: FC<
|
|||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
|
||||
const target = e.target as HTMLElement
|
||||
const linkElement = target.closest("a")
|
||||
|
||||
if (linkElement) {
|
||||
const href = linkElement.getAttribute("href")
|
||||
if (!href) return
|
||||
|
||||
if (entry?.id && href.endsWith(entry.id)) return
|
||||
window.open(href, "_blank")
|
||||
return
|
||||
}
|
||||
|
||||
const shouldNavigate = getRouteParams().entryId !== entry?.id
|
||||
|
||||
if (!shouldNavigate) return
|
||||
|
|
|
|||
Loading…
Reference in New Issue