toolbar: remove unuse buttonRef in ActionButton

This commit is contained in:
David Lechner
2021-12-27 12:38:50 -06:00
parent 9be6ba3640
commit eb9ea2876e
+1 -4
View File
@@ -4,7 +4,7 @@
import { Button, IRef, Intent, Spinner, useHotkeys } from '@blueprintjs/core';
import { Tooltip2 } from '@blueprintjs/popover2';
import { useI18n } from '@shopify/react-i18n';
import React, { useMemo, useRef } from 'react';
import React, { useMemo } from 'react';
import { tooltipDelay } from '../app/constants';
import { TooltipId } from './i18n';
import en from './i18n.en.json';
@@ -31,8 +31,6 @@ export interface ActionButtonProps {
}
const ActionButton: React.FC<ActionButtonProps> = (props) => {
const buttonRef = useRef<Button>(null);
const [i18n] = useI18n({ id: 'actionButton', translations: { en }, fallback: en });
const tooltipText =
@@ -82,7 +80,6 @@ const ActionButton: React.FC<ActionButtonProps> = (props) => {
<Button
elementRef={tooltipRef as IRef<HTMLButtonElement>}
{...tooltipProps}
ref={buttonRef}
intent={Intent.PRIMARY}
// prevent focus from mouse click
onMouseDown={(e) => e.preventDefault()}