Skip to content

Commit

Permalink
add comment explaining why we use redux store instead of a cached value
Browse files Browse the repository at this point in the history
  • Loading branch information
sickelap committed Jan 24, 2024
1 parent 5aebfb4 commit 329b445
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/api_client/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ export const util = api
[Endpoints.fetchWordCloud]: builder.query<WordCloudResponse, void>({
query: () => "wordcloud/",
async onQueryStarted(arg, { dispatch, queryFulfilled }) {
/**
* This is a workaround. For the time being we'll use redux store instead of cache.
* The use of cached data is not working properly with Word Cloud component. This could be due to the timing.
*/
dispatch({ type: "FETCH_WORDCLOUD" });
try {
const { data } = await queryFulfilled;
Expand Down

0 comments on commit 329b445

Please sign in to comment.