Skip to content

Commit cc38a12

Browse files
committed
added cachebust for sampletype browser
1 parent 754d7b3 commit cc38a12

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/biorepo_components/BiorepoCollectionsContent.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ export default function BiorepoCollectionsContent() {
9797
setValue(newValue);
9898
};
9999

100+
const cacheBust = `v=${Date.now()}`;
101+
100102
useEffect(() => {
101-
fetch('../../neon-react/biorepo_lib/collections-taxonomic.json')
103+
fetch('../../neon-react/biorepo_lib/collections-taxonomic.json?${cacheBust}')
102104
.then((response) => response.json())
103105
.then((data) => {
104106
setTaxonomicNodes(data);
@@ -107,7 +109,7 @@ export default function BiorepoCollectionsContent() {
107109
}, []);
108110

109111
useEffect(() => {
110-
fetch('../../neon-react/biorepo_lib/collections-protocol.json')
112+
fetch('../../neon-react/biorepo_lib/collections-protocol.json?${cacheBust}')
111113
.then((response) => response.json())
112114
.then((data) => {
113115
setSampletypeNodes(data);
@@ -116,7 +118,7 @@ export default function BiorepoCollectionsContent() {
116118
}, []);
117119

118120
useEffect(() => {
119-
fetch('../../neon-react/biorepo_lib/collections-sampletype.json')
121+
fetch('../../neon-react/biorepo_lib/collections-sampletype.json?${cacheBust}')
120122
.then((response) => response.json())
121123
.then((data) => {
122124
setProtocolNodes(data);

0 commit comments

Comments
 (0)