diff --git a/front-end/views/hashtag.mjs b/front-end/views/hashtag.mjs index 7b7e996..5e2088a 100644 --- a/front-end/views/hashtag.mjs +++ b/front-end/views/hashtag.mjs @@ -17,8 +17,10 @@ import {createHeading} from "../components/heading.mjs"; function hashtagView(hashtag) { destroy(); - apiService.getBloomsByHashtag(hashtag); - + if (state.currentHashtag !== hashtag) { // fetches only when the hashtag changes + state.updateState({ currentHashtag: hashtag }); + apiService.getBloomsByHashtag(hashtag); + } renderOne( state.isLoggedIn, getLogoutContainer(),