thunderhub/pages/chain.tsx
2020-08-25 08:47:43 +02:00

34 lines
927 B
TypeScript

import React from 'react';
import { GridWrapper } from 'src/components/gridWrapper/GridWrapper';
import { NextPageContext } from 'next';
import { getProps } from 'src/utils/ssr';
import { GET_CHAIN_TRANSACTIONS } from 'src/graphql/queries/getChainTransactions';
import { GET_UTXOS } from 'src/graphql/queries/getUtxos';
import { GET_NODE_INFO } from 'src/graphql/queries/getNodeInfo';
import { ChainTransactions } from '../src/views/chain/transactions/ChainTransactions';
import { ChainUtxos } from '../src/views/chain/utxos/ChainUtxos';
const ChainView = () => {
return (
<>
<ChainUtxos />
<ChainTransactions />
</>
);
};
const Wrapped = () => (
<GridWrapper>
<ChainView />
</GridWrapper>
);
export default Wrapped;
export async function getServerSideProps(context: NextPageContext) {
return await getProps(context, [
GET_CHAIN_TRANSACTIONS,
GET_UTXOS,
GET_NODE_INFO,
]);
}