Skip to content

Commit

Permalink
Get queryclient from hook
Browse files Browse the repository at this point in the history
  • Loading branch information
kurukimi committed Aug 16, 2024
1 parent a5fea58 commit 3372277
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions web/src/jira/components/JiraIssueComboBox.tsx
Original file line number Diff line number Diff line change
@@ -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<T extends FieldValues> = {
form: UseFormReturn<T>;
Expand All @@ -23,6 +23,8 @@ const JiraIssueComboBox = <T extends FieldValues>({
...params
}: JiraIssueComboBoxProps<T>) => {
const { data, loading } = useQuery(FindDimensionOptionsDocument);
const queryClient = useQueryClient();
const { t } = useTranslation();

const nvKeys = data?.findDimensionOptions[name] || [];

Expand Down

0 comments on commit 3372277

Please sign in to comment.