import 'tailwindcss/tailwind.css' import type { AppProps } from 'next/app' import { useEffect } from 'react' import Head from 'next/head' import Script from 'next/script' import { QueryClient, QueryClientProvider } from 'react-query' import { AuthProvider, AuthUser } from 'web/components/auth-context' import Welcome from 'web/components/onboarding/welcome' function firstLine(msg: string) { return msg.replace(/\r?\n.*/s, '') } function printBuildInfo() { // These are undefined if e.g. dev server if (process.env.NEXT_PUBLIC_VERCEL_ENV) { const env = process.env.NEXT_PUBLIC_VERCEL_ENV const msg = process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_MESSAGE const owner = process.env.NEXT_PUBLIC_VERCEL_GIT_REPO_OWNER const repo = process.env.NEXT_PUBLIC_VERCEL_GIT_REPO_SLUG const sha = process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA const url = `https://github.com/${owner}/${repo}/commit/${sha}` console.info(`Build: ${env} / ${firstLine(msg || '???')} / ${url}`) } } // specially treated props that may be present in the server/static props type ManifoldPageProps = { auth?: AuthUser } function MyApp({ Component, pageProps }: AppProps) { useEffect(printBuildInfo, []) return ( <> {'Manifold Markets — A market for every question'} ) } const queryClient = new QueryClient() export default MyApp