Skip to content

Commit

Permalink
chore(import): remove prefetching for import log
Browse files Browse the repository at this point in the history
There's no need for prefetching since getting logs via API is fast enough

Signed-off-by: Danil Kostromin <[email protected]>
  • Loading branch information
Danil Kostromin committed Jan 12, 2024
1 parent 61247b1 commit 8fae55c
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* SPDX-FileCopyrightText: 2021-2023 OKTET Labs Ltd. */
import { ComponentProps, ElementRef, useEffect, useRef } from 'react';

import { useGetImportLogQuery, usePrefetch } from '@/services/bublik-api';
import { useGetImportLogQuery } from '@/services/bublik-api';
import {
Dialog,
DialogClose,
Expand All @@ -24,11 +24,9 @@ export const JsonLogContainer = ({
taskId,
enablePolling
}: JsonLogContainerProps) => {
const prefetchLog = usePrefetch('getImportLog');

return (
<Dialog>
<DialogTrigger asChild onMouseEnter={() => prefetchLog(taskId)}>
<DialogTrigger asChild>
<button className="relative inline-flex items-center justify-start px-2 w-fit transition-all appearance-none select-none whitespace-nowrap text-primary bg-primary-wash rounded-md gap-1 h-[1.625rem] border-2 border-transparent hover:border-[#94b0ff]">
<Icon name="BoxArrowRight" />
<span>Logs</span>
Expand Down

0 comments on commit 8fae55c

Please sign in to comment.