forked from extern/bruno
fix(#836): Fix graphql blank screen issue
This commit is contained in:
parent
32d9c4833e
commit
49f29fa2af
@ -1,6 +1,6 @@
|
|||||||
import React, { useEffect, useRef, forwardRef } from 'react';
|
import React, { useEffect, useRef, forwardRef } from 'react';
|
||||||
import useGraphqlSchema from './useGraphqlSchema';
|
import useGraphqlSchema from './useGraphqlSchema';
|
||||||
import { IconBook, IconDownload, IconLoader2, IconCheckmark } from '@tabler/icons';
|
import { IconBook, IconDownload, IconLoader2, IconRefresh } from '@tabler/icons';
|
||||||
import get from 'lodash/get';
|
import get from 'lodash/get';
|
||||||
import { findEnvironmentInCollection } from 'utils/collections';
|
import { findEnvironmentInCollection } from 'utils/collections';
|
||||||
import Dropdown from '../../Dropdown';
|
import Dropdown from '../../Dropdown';
|
||||||
@ -30,8 +30,8 @@ const GraphQLSchemaActions = ({ item, collection, onSchemaLoad, toggleDocs }) =>
|
|||||||
return (
|
return (
|
||||||
<div ref={ref} className="dropdown-icon cursor-pointer flex hover:underline ml-2">
|
<div ref={ref} className="dropdown-icon cursor-pointer flex hover:underline ml-2">
|
||||||
{isSchemaLoading && <IconLoader2 className="animate-spin" size={18} strokeWidth={1.5} />}
|
{isSchemaLoading && <IconLoader2 className="animate-spin" size={18} strokeWidth={1.5} />}
|
||||||
{!isSchemaLoading && schema && <IconDownload size={18} strokeWidth={1.5} />}
|
{!isSchemaLoading && schema && <IconRefresh size={18} strokeWidth={1.5} />}
|
||||||
{!isSchemaLoading && !schema && <IconCheckmark size={18} strokeWidth={1.5} />}
|
{!isSchemaLoading && !schema && <IconDownload size={18} strokeWidth={1.5} />}
|
||||||
<span className="ml-1">Schema</span>
|
<span className="ml-1">Schema</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user