import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { LoginForm } from '../components/LoginForm'

const el = document.getElementById('login-app')
if (el) {
  createRoot(el).render(
    <StrictMode>
      <LoginForm
        loginUrl={el.dataset.loginUrl || ''}
        successUrl={el.dataset.successUrl || 'my-account'}
        csrfToken={el.dataset.csrf || ''}
        siteKey={el.dataset.sitekey || ''}
      />
    </StrictMode>,
  )
}
