NextJS SSR on nested routes

hi i have this case/page where i need SSR for opengraph metatags which is dynamic for each page

let say i have routes
/[profileName]
and
/[profileName]/achievement

im hitting
getProfile
in SSR block inside
[profileName].tsx
,

the thing is i also hitting the same endpoint in
/[profileName]/achievement.tsx
SSR block bcs i want to keep the meta tags which slows me down because everytime i change route between them a SSR is executed

anyone know how to improve this ?
im using react query &
prefetchQuery
if thats help, thanks!
Was this page helpful?