Skip to content

Commit 1fbc84a

Browse files
committed
fix: resolves cache issue for locale in project detail pages
1 parent aac6bb4 commit 1fbc84a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/features/projects/components/ProjectSnippet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default function ProjectSnippet({
111111
<div
112112
onClick={() => {
113113
router.push(
114-
`/${project.slug}/${
114+
`/${locale}/${project.slug}/${
115115
embed === 'true'
116116
? `${
117117
callbackUrl != undefined

src/features/projects/components/maps/Markers.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { ParamsContext } from '../../../common/Layout/QueryParamsContext';
77
import ProjectTypeIcon from '../ProjectTypeIcon';
88
import { SetState } from '../../../common/types/common';
99
import { MapProject } from '../../../common/types/ProjectPropsContextInterface';
10+
import { useLocale } from 'next-intl';
1011

1112
type PopupClosedData = {
1213
show: false;
@@ -32,6 +33,7 @@ export default function Markers({
3233
}: Props): ReactElement {
3334
let timer: NodeJS.Timeout;
3435
const router = useRouter();
36+
const locale = useLocale();
3537
const [open, setOpen] = React.useState(false);
3638
const buttonRef = React.useRef<HTMLButtonElement>(null);
3739
const { embed, callbackUrl } = React.useContext(ParamsContext);
@@ -47,7 +49,7 @@ export default function Markers({
4749
};
4850
const goToProject = (projectSlug: string): void => {
4951
router.push(
50-
`/${projectSlug}/${
52+
`/${locale}/${projectSlug}/${
5153
embed === 'true'
5254
? `${
5355
callbackUrl != undefined

0 commit comments

Comments
 (0)