Skip to content

Commit

Permalink
refactor: rename hook
Browse files Browse the repository at this point in the history
  • Loading branch information
begonaalvarezd committed Feb 26, 2024
1 parent 2e08300 commit ba176e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/src/app/routes/nova/SlotPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import useSlotCommitment from "~/helpers/nova/hooks/useSlotCommitment";
import useuseSlotDetails from "~/helpers/nova/hooks/useSlotDetails";
import StatusPill from "~/app/components/nova/StatusPill";
import PageDataRow, { IPageDataRow } from "~/app/components/nova/PageDataRow";
import Modal from "~/app/components/Modal";
Expand All @@ -24,7 +24,7 @@ export default function SlotPage({
network: string;
slotIndex: string;
}>): React.JSX.Element {
const { slotCommitment } = useSlotCommitment(network, slotIndex);
const { slotCommitment } = useuseSlotDetails(network, slotIndex);

const parsedSlotIndex = parseSlotIndex(slotIndex);
const slotState = slotCommitment ? SlotState.Finalized : SlotState.Pending;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import { useIsMounted } from "~/helpers/hooks/useIsMounted";
import { NOVA } from "~/models/config/protocolVersion";
import { NovaApiClient } from "~/services/nova/novaApiClient";

interface IUseSlotData {
interface IUseSlotDetails {
slotCommitment: SlotCommitment | null;
error: string | undefined;
isLoading: boolean;
}

export default function useSlotData(network: string, slotIndex: string): IUseSlotData {
export default function useSlotDetails(network: string, slotIndex: string): IUseSlotDetails {
const isMounted = useIsMounted();
const [apiClient] = useState(ServiceFactory.get<NovaApiClient>(`api-client-${NOVA}`));
const [slotCommitment, setSlotCommitment] = useState<SlotCommitment | null>(null);
Expand Down

0 comments on commit ba176e5

Please sign in to comment.