import { AppProps } from 'next/app'
import { ApolloProvider } from '@apollo/client'

import client from '../src/lib/apollo'
import { UserProvider } from '../src/user/hooks'

const MyApp = ({ Component, pageProps }: AppProps) => {
  return (
    <ApolloProvider client={client}>
      <UserProvider>
        <Component {...pageProps} />
      </UserProvider>
    </ApolloProvider>
  )
}

export default MyApp
