File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 1- import { renderOne , renderEach , destroy } from "../lib/render.mjs" ;
1+ import { renderOne , renderEach , destroy } from "../lib/render.mjs" ;
22import {
33 state ,
44 apiService ,
@@ -7,17 +7,20 @@ import {
77 getTimelineContainer ,
88 getHeadingContainer ,
99} from "../index.mjs" ;
10- import { createLogin , handleLogin } from "../components/login.mjs" ;
11- import { createLogout , handleLogout } from "../components/logout.mjs" ;
12- import { createBloom } from "../components/bloom.mjs" ;
13- import { createHeading } from "../components/heading.mjs" ;
10+ import { createLogin , handleLogin } from "../components/login.mjs" ;
11+ import { createLogout , handleLogout } from "../components/logout.mjs" ;
12+ import { createBloom } from "../components/bloom.mjs" ;
13+ import { createHeading } from "../components/heading.mjs" ;
1414
1515// Hashtag view: show all tweets containing this tag
1616
1717function hashtagView ( hashtag ) {
1818 destroy ( ) ;
1919
20- apiService . getBloomsByHashtag ( hashtag ) ;
20+ const expectedHashtag = `#${ hashtag } ` ;
21+ if ( state . currentHashtag !== expectedHashtag ) {
22+ apiService . getBloomsByHashtag ( hashtag ) ;
23+ }
2124
2225 renderOne (
2326 state . isLoggedIn ,
@@ -52,4 +55,4 @@ function hashtagView(hashtag) {
5255 ) ;
5356}
5457
55- export { hashtagView } ;
58+ export { hashtagView } ;
You can’t perform that action at this time.
0 commit comments