Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename hook to follow convention
Browse files Browse the repository at this point in the history
kdelemme committed Feb 8, 2024

Verified

This commit was signed with the committer’s verified signature.
1 parent 6ef2b5f commit c067ce9
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ export interface UseInspectSLOResponse {
isError: boolean;
}

export function useInspectSlo(slo: CreateSLOInput, shouldInspect: boolean) {
export function useFetchSloInspect(slo: CreateSLOInput, shouldInspect: boolean) {
const { http } = useKibana().services;

const { isLoading, isError, isSuccess, data } = useQuery({
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ import React, { ReactNode, useState } from 'react';
import { useFormContext } from 'react-hook-form';
import { ObservabilityPublicPluginsStart } from '../../../..';
import { enableInspectEsQueries } from '../../../../../common';
import { useInspectSlo } from '../../../../hooks/slo/use_inspect_slo';
import { useFetchSloInspect } from '../../../../hooks/slo/use_fetch_slo_inspect';
import { usePluginContext } from '../../../../hooks/use_plugin_context';
import { transformCreateSLOFormToCreateSLOInput } from '../../helpers/process_slo_form_values';
import { CreateSLOForm } from '../../types';
@@ -64,7 +64,7 @@ function SLOInspect({ slo, disabled }: Props) {
const [isFormValid, setFormValid] = useState(false);

const sloFormValues = transformCreateSLOFormToCreateSLOInput(getValues());
const { data: inspectSloData, isLoading } = useInspectSlo(
const { data: inspectSloData, isLoading } = useFetchSloInspect(
{ ...sloFormValues, id: slo?.id, revision: slo?.revision },
isFlyoutVisible && isFormValid
);

0 comments on commit c067ce9

Please sign in to comment.