import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App'
import './index.css'

// Set title immediately so shared links never show "figma-make-app"
document.title = 'myStand Up · AJ Digital Agency'

// Open Graph / meta tags for link previews
const setMeta = (prop: string, val: string, attr = 'name') => {
  let el = document.querySelector(`meta[${attr}="${prop}"]`) as HTMLMetaElement | null
  if (!el) { el = document.createElement('meta'); el.setAttribute(attr, prop); document.head.appendChild(el) }
  el.setAttribute('content', val)
}
setMeta('description', 'Daily stand-up and team operations for AJ Digital Agency')
setMeta('application-name', 'myStand Up')
setMeta('og:title', 'myStand Up · AJ Digital Agency', 'property')
setMeta('og:description', 'Daily stand-up and team operations for AJ Digital Agency', 'property')

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
)
