fix: broken navigation to resistant page

proto-module-actu-react
Jalil Arfaoui 2023-05-13 23:57:21 +02:00
parent 147f85776c
commit 8b09312f2d
2 changed files with 6 additions and 2 deletions

View File

@ -13,7 +13,9 @@ export const PopupContent = ({ resistant }: { resistant: Resistant }) => {
<div
style={{ minWidth: "30em", minHeight: "15em" }}
onClick={() =>
navigate(isHome ? getResistantPageUrl(resistant) : resistant.id)
isHome
? window.location.assign(getResistantPageUrl(resistant))
: navigate(resistant.id)
}
>
<img

View File

@ -22,7 +22,9 @@ export const ResistantThumb = ({ resistant }: Props) => {
<div
className="thumb resistant-thumb"
onClick={() =>
navigate(isHome ? getResistantPageUrl(resistant) : resistant.id)
isHome
? window.location.assign(getResistantPageUrl(resistant))
: navigate(resistant.id)
}
style={{ position: "relative" }}
>