Skip to content

Commit

Permalink
Moving setImageHero back to pathname useEffect.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mika Munterud committed Mar 25, 2024
1 parent 25659e7 commit 60ec434
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,8 @@ function Dataportal({ Component, pageProps }: DataportalenProps) {

useEffect(() => {
asPath.includes("#") && onHash(asPath);
}, [pathname]);

useEffect(() => {
setImageHero(heroImage);
}, []);
}, [pathname]);

return (
<ApolloProvider client={client}>
Expand Down

0 comments on commit 60ec434

Please sign in to comment.