mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 01:22:29 +08:00
i18n: removes useTranslate hook (#106556)
* i18n: removes useTranslate hook * chore: fix duplicate imports * chore: fix import sorting and hook dependencies
This commit is contained in:
@ -2,7 +2,7 @@ import { FormEvent, ReactElement, useCallback } from 'react';
|
||||
|
||||
import { TextBoxVariableModel } from '@grafana/data';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { Trans, useTranslate } from '@grafana/i18n';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
|
||||
import { VariableLegend } from '../../dashboard-scene/settings/variables/components/VariableLegend';
|
||||
import { VariableTextField } from '../../dashboard-scene/settings/variables/components/VariableTextField';
|
||||
@ -20,8 +20,6 @@ export function TextBoxVariableEditor({ onPropChange, variable: { query } }: Pro
|
||||
[onPropChange]
|
||||
);
|
||||
|
||||
const { t } = useTranslate();
|
||||
|
||||
const onChange = useCallback((e: FormEvent<HTMLInputElement>) => updateVariable(e, false), [updateVariable]);
|
||||
const onBlur = useCallback((e: FormEvent<HTMLInputElement>) => updateVariable(e, true), [updateVariable]);
|
||||
|
||||
|
Reference in New Issue
Block a user