Files
SkinbaseNova/.deploy/artwork-evolution-release/resources/js/entry-search.jsx
2026-04-18 17:02:56 +02:00

20 lines
513 B
JavaScript

import React from 'react'
import { createRoot } from 'react-dom/client'
import SearchBar from './Search/SearchBar'
function mount() {
const container = document.getElementById('topbar-search-root')
if (!container) return
const initialIntent = window.__sbSearchIntent ?? null
window.__sbSearchIntent = null
createRoot(container).render(<SearchBar initialIntent={initialIntent} />)
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', mount)
} else {
mount()
}