diff --git a/src/useExporterPlugin.tsx b/src/useExporterPlugin.tsx index 80a65bf..3eb5710 100644 --- a/src/useExporterPlugin.tsx +++ b/src/useExporterPlugin.tsx @@ -1,6 +1,6 @@ -import {useMemo, useRef} from 'react' -import type {ComponentType} from 'react' -import CodeExporter from './CodeExporter' +import {useMemo, useRef} from 'react'; +import type {ComponentType} from 'react'; +import CodeExporter from './CodeExporter'; // Copied from `@graphiql/react` to avoid adding a dependency for a single type definition type GraphiQLPlugin = { @@ -21,23 +21,47 @@ type GraphiQLPlugin = { }; function useExporterPlugin(props: any) { - const propsRef = useRef(props) - propsRef.current = props + const propsRef = useRef(props); + propsRef.current = props; return useMemo( () => ({ title: 'Connect', icon: () => ( - + + + + + ), @@ -46,7 +70,7 @@ function useExporterPlugin(props: any) { ), }), [], - ) + ); } -export {useExporterPlugin} +export {useExporterPlugin};