fix build
This commit is contained in:
@@ -48,19 +48,11 @@ export const NodeProfileCard = ({ id }: INodeProfileCardProps) => {
|
||||
refetchOnMount: false,
|
||||
});
|
||||
|
||||
if (isError || !nymNodes) {
|
||||
return (
|
||||
<ExplorerCard label="Nym Node" sx={{ height: "100%" }}>
|
||||
<Typography variant="h3" sx={{ color: "pine.950" }}>
|
||||
Failed to load node data.
|
||||
</Typography>
|
||||
</ExplorerCard>
|
||||
);
|
||||
}
|
||||
const nodeInfo = nymNodes.find((node) => node.node_id === id);
|
||||
|
||||
const nodeInfo = nymNodes?.find((node) => node.node_id === id);
|
||||
|
||||
const handleOnSelectStake = useCallback(() => {
|
||||
if (!nodeInfo) return;
|
||||
if (!isWalletConnected) {
|
||||
setInfoModalProps({
|
||||
open: true,
|
||||
@@ -88,6 +80,16 @@ export const NodeProfileCard = ({ id }: INodeProfileCardProps) => {
|
||||
}
|
||||
}, [isWalletConnected, nodeInfo]);
|
||||
|
||||
if (isError || !nymNodes) {
|
||||
return (
|
||||
<ExplorerCard label="Nym Node" sx={{ height: "100%" }}>
|
||||
<Typography variant="h3" sx={{ color: "pine.950" }}>
|
||||
Failed to load node data.
|
||||
</Typography>
|
||||
</ExplorerCard>
|
||||
);
|
||||
}
|
||||
|
||||
if (isLoadingNymNodes) {
|
||||
return (
|
||||
<ExplorerCard label="Nym Node" sx={{ height: "100%" }}>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { getQueryClient } from "@/app/react-query";
|
||||
import { QueryClientProvider } from "@tanstack/react-query";
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
import { type ReactNode, useState } from "react";
|
||||
import { type ReactNode } from "react";
|
||||
|
||||
interface QueryProviderProps {
|
||||
children: ReactNode;
|
||||
|
||||
Reference in New Issue
Block a user