import React from 'react'
import ReactDOM from 'react-dom/client'
import { ClerkProvider } from '@clerk/clerk-react'
import App from './App'

// Some ISPs block clerk.anisakura.xyz, so affected users can't sign in
// without a VPN. After deploying the clerk-proxy worker and setting the
// Proxy URL in the Clerk dashboard (see clerk-proxy/README.md), set this to
// "https://anisakura.xyz/__clerk" to route sign-in through the main domain.
// Leave null until then or sign-in will break for everyone.
const CLERK_PROXY_URL = null

ReactDOM.createRoot(document.getElementById('root')).render(
  <React.StrictMode>
    <ClerkProvider
      publishableKey="pk_live_Y2xlcmsuYW5pc2FrdXJhLnh5eiQ"
      {...(CLERK_PROXY_URL ? { proxyUrl: CLERK_PROXY_URL } : {})}
    >
      <App />
    </ClerkProvider>
  </React.StrictMode>
)
