From 3372277b67e4bbef905aae2304f14517628a000e Mon Sep 17 00:00:00 2001 From: Kimi Kuru Date: Wed, 17 Jul 2024 09:57:51 +0300 Subject: [PATCH] Get queryclient from hook --- web/src/jira/components/JiraIssueComboBox.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/web/src/jira/components/JiraIssueComboBox.tsx b/web/src/jira/components/JiraIssueComboBox.tsx index 82cfacb..b6bbe30 100644 --- a/web/src/jira/components/JiraIssueComboBox.tsx +++ b/web/src/jira/components/JiraIssueComboBox.tsx @@ -1,15 +1,15 @@ +import { useEffect, useState } from "react"; import { ListItem, ListItemText, Typography } from "@mui/material"; import { ControllerProps, FieldValues, UseFormReturn } from "react-hook-form"; -import { FindDimensionOptionsDocument } from "../../graphql/generated/graphql"; import { useQuery } from "@apollo/client"; +import { useQueryClient } from "@tanstack/react-query"; +import { useDebounceValue } from "usehooks-ts"; import useInfiniteScroll from "react-infinite-scroll-hook"; +import { FindDimensionOptionsDocument } from "../../graphql/generated/graphql"; import DimensionComboBox from "../../components/entry-dialog/DimensionComboBox"; -import { useDebounceValue } from "usehooks-ts"; -import { useEffect, useState } from "react"; import { useJiraIssueOptions } from "./useJiraIssueOptions"; import { useNotificationState } from "../../components/global-notification/useNotification"; -import { queryClient } from "../queryClient"; -import { t } from "i18next"; +import { useTranslation } from "react-i18next"; type JiraIssueComboBoxProps = { form: UseFormReturn; @@ -23,6 +23,8 @@ const JiraIssueComboBox = ({ ...params }: JiraIssueComboBoxProps) => { const { data, loading } = useQuery(FindDimensionOptionsDocument); + const queryClient = useQueryClient(); + const { t } = useTranslation(); const nvKeys = data?.findDimensionOptions[name] || [];