rsnext/examples/with-ably/pages/_app.tsx
Jo Franchetti bbffaea755
Adding with-ably example for realtime messaging in next apps (#37319)
* update from latest canary

* lint-fix
2022-06-29 12:52:04 +02:00

18 lines
456 B
TypeScript

import '../styles/globals.css'
import { configureAbly } from '@ably-labs/react-hooks'
const prefix = process.env.API_ROOT || ''
const clientId =
Math.random().toString(36).substring(2, 15) +
Math.random().toString(36).substring(2, 15)
configureAbly({
authUrl: `${prefix}/api/createTokenRequest?clientId=${clientId}`,
clientId: clientId,
})
function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
}
export default MyApp