vega-frontend-monorepo/apps/trading/pages/_app.page.tsx

27 lines
759 B
TypeScript
Raw Normal View History

2022-02-28 23:43:36 +00:00
import { ApolloProvider } from '@apollo/client';
import { AppProps } from 'next/app';
import Head from 'next/head';
2022-02-28 23:43:36 +00:00
import { useMemo } from 'react';
2022-02-17 05:08:17 +00:00
import { Navbar } from '../components/navbar';
2022-02-28 23:43:36 +00:00
import { createClient } from '../lib/apollo-client';
2022-02-23 17:57:44 +00:00
import './styles.css';
2022-02-17 05:03:46 +00:00
function VegaTradingApp({ Component, pageProps }: AppProps) {
2022-02-28 23:43:36 +00:00
const client = useMemo(() => createClient(process.env['NX_VEGA_URL']), []);
return (
2022-02-28 23:43:36 +00:00
<ApolloProvider client={client}>
<Head>
<title>Welcome to trading!</title>
</Head>
<div className="h-full grid grid-rows-[min-content,_1fr]">
<Navbar />
<main>
<Component {...pageProps} />
</main>
</div>
2022-02-28 23:43:36 +00:00
</ApolloProvider>
);
}
2022-02-17 05:03:46 +00:00
export default VegaTradingApp;