[#128] Fix type issues

This commit is contained in:
Bartłomiej Głownia 2022-03-29 19:31:00 +02:00
parent 444f1b6584
commit 9c42f54331
4 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ import type { AgGridReact } from 'ag-grid-react';
const Markets = () => {
const { pathname, push } = useRouter();
const gridRef = useRef<AgGridReact>();
const gridRef = useRef<AgGridReact | null>(null);
const update = useCallback(
(delta: Markets_markets_data) => {
const update: Markets_markets[] = [];

View File

@ -16,9 +16,9 @@ import type { AgGridReact } from 'ag-grid-react';
export const Positions = () => {
const { pathname, push } = useRouter();
const gridRef = useRef<AgGridReact>();
const gridRef = useRef<AgGridReact | null>(null);
const { keypair } = useVegaWallet();
const variables = useMemo(() => ({ partyId: keypair.pub }), [keypair]);
const variables = useMemo(() => ({ partyId: keypair?.pub }), [keypair]);
const update = useCallback(
(delta: PositionSubscribe_positions) => {
const update: Positions_party_positions[] = [];

View File

@ -7,7 +7,7 @@ import { AgGridColumn } from 'ag-grid-react';
import type { AgGridReact } from 'ag-grid-react';
interface MarketListTableProps {
data: Markets_markets[];
data: Markets_markets[] | null;
onRowClicked: (marketId: string) => void;
}

View File

@ -16,7 +16,7 @@ import {
} from '@vegaprotocol/graphql';
interface PositionsTableProps {
data: Positions_party_positions[];
data: Positions_party_positions[] | null;
onRowClicked: (marketId: string) => void;
}