diff --git a/frontend/src/pages/Profile/ProfileReview.tsx b/frontend/src/pages/Profile/ProfileReview.tsx index 266804b3..df2a3f16 100644 --- a/frontend/src/pages/Profile/ProfileReview.tsx +++ b/frontend/src/pages/Profile/ProfileReview.tsx @@ -1,4 +1,4 @@ -import { Link } from 'react-router'; +import { Link, useLocation } from 'react-router'; import type { MyReview } from '../../types/profile'; import { formatDate, formatHours, stars } from '../../utils/reviewFormat'; @@ -8,6 +8,8 @@ import { formatDate, formatHours, stars } from '../../utils/reviewFormat'; */ export function ProfileReview({ review }: { review: MyReview }) { const { game } = review; + // Hvor anmeldelsen står (/profil eller /profil/anmeldelser), så detaljsiden kan lenke tilbake hit + const { pathname, search } = useLocation(); // Mindre bilde fra RAWG, samme triks som i GameCard, så vi ikke laster fullstørrelse const imgSuffix = game.backgroundImage?.split('/media/')[1]; @@ -29,7 +31,9 @@ export function ProfileReview({ review }: { review: MyReview }) {

- {game.name} + + {game.name} +

{/* Stjernene er bare pynt. Skjermlesere leser "4 av 5" i stedet */}