2022-02-28 23:43:36 +00:00
|
|
|
import { ApolloProvider } from '@apollo/client';
|
2022-02-11 13:56:28 +00:00
|
|
|
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-11 13:56:28 +00:00
|
|
|
|
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']), []);
|
2022-02-11 13:56:28 +00:00
|
|
|
return (
|
2022-02-28 23:43:36 +00:00
|
|
|
<ApolloProvider client={client}>
|
2022-02-11 13:56:28 +00:00
|
|
|
<Head>
|
|
|
|
<title>Welcome to trading!</title>
|
|
|
|
</Head>
|
2022-03-01 00:59:18 +00:00
|
|
|
<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-11 13:56:28 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-02-17 05:03:46 +00:00
|
|
|
export default VegaTradingApp;
|