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 <div
style={{ minWidth: "30em", minHeight: "15em" }} style={{ minWidth: "30em", minHeight: "15em" }}
onClick={() => onClick={() =>
navigate(isHome ? getResistantPageUrl(resistant) : resistant.id) isHome
? window.location.assign(getResistantPageUrl(resistant))
: navigate(resistant.id)
} }
> >
<img <img

View File

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