import { Markets } from '@vegaprotocol/graphql';
import { useRouter } from 'next/router';
import { MarketListTable } from '@vegaprotocol/market-list';
import { useMarkets } from '../../hooks/use-markets';
import { Splash } from '@vegaprotocol/ui-toolkit';
const Markets = () => {
const { pathname, push } = useRouter();
const { markets, error, loading } = useMarkets();
if (error) {
return Something went wrong: {error.message};
}
if (loading) {
return Loading...;
}
return (
push(`${pathname}/${id}?portfolio=orders&trade=orderbook`)
}
/>
);
};
export default Markets;