import '../bootstrap'
import React from 'react'
import { createRoot } from 'react-dom/client'
import DashboardPage from './DashboardPage'

const rootElement = document.getElementById('dashboard-root')

if (rootElement) {
  const root = createRoot(rootElement)
  root.render(
    <DashboardPage
      username={rootElement.dataset.username || 'Creator'}
      isCreator={rootElement.dataset.isCreator === '1'}
    />
  )
}
