hunk.code_window:         environmentId: session.environment._id,
           channelType: ChannelTypeEnum.SMS,
         })
       );
       expect(result).to.have.length(0);
     });
     it('should not return Novu integration if there is active integrations', async function () {
       sinon.stub(integrationRepository, 'count').resolves(1);
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep
hunk.after_edit:     expect(result).to.equal(undefined);
  
hunk.file_path: apps/api/src/app/integrations/usecases/get-novu-integration/get-novu-integration.spec.ts
hunk.type: replace
file: import { useQuery } from '@tanstack/react-query';
  import { INotificationTemplate } from '@novu/shared';
  
  import { getTemplateById } from '../../api/templates';
  
  export function useTemplateFetcher(templateId) {
    const {
      isInitialLoading,
      data: template,
      refetch,
    } = useQuery<INotificationTemplate>([`notificationById:${templateId}`], () => getTemplateById(templateId), {
      enabled: !!templateId,
      refetchOnMount: false,
      refetchInterval: false,
    });
  
    return {
      template,
      loading: isInitialLoading,
      refetch,
    };
  }
  