Skip to content

Commit

Permalink
fix(frontend): Don't use Apollo Cache for IsAnalyticsEnabled query. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jjoyce0510 committed Jul 16, 2021
1 parent 79218b1 commit f8713fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datahub-web-react/src/app/home/HomePageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ export const HomePageHeader = () => {
const [getAutoCompleteResultsForAll, { data: suggestionsData }] = useGetAutoCompleteAllResultsLazyQuery();
const themeConfig = useTheme();

const { data } = useIsAnalyticsEnabledQuery();
const isAnalyticsEnabled = data && data.isAnalyticsEnabled;
const { data } = useIsAnalyticsEnabledQuery({ fetchPolicy: 'no-cache' });
const isAnalyticsEnabled = (data && data.isAnalyticsEnabled) || false;

const onSearch = (query: string, type?: EntityType) => {
if (!query || query.trim().length === 0) {
Expand Down

0 comments on commit f8713fa

Please sign in to comment.