Skip to content

Commit

Permalink
Chore: fix watermark condition (#26095)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Jul 1, 2022
1 parent 26c310c commit 3394c0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/meteor/client/sidebar/footer/SidebarFooterWatermark.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { useQuery } from 'react-query';
export const SidebarFooterWatermark = (): ReactElement | null => {
const t = useTranslation();
const isEnterpriseEdition = useEndpoint('GET', '/v1/licenses.isEnterprise');
const { data, isSuccess } = useQuery(['licenses'], () => isEnterpriseEdition(), {
const result = useQuery(['licenses'], () => isEnterpriseEdition(), {
refetchOnWindowFocus: false,
});

if (!isSuccess && !data?.isEnterprise) {
if (!result.isSuccess || result.isLoading || result.data.isEnterprise) {
return null;
}

Expand Down

0 comments on commit 3394c0d

Please sign in to comment.