nomadro/apps/admin/src/main.tsx
Eric 4ad87fd4ab Ship pending portal, admin, miniprogram, and ebook business updates.
Refresh audience/admin UX, ntfy/track, social paths, and replace ebook chapters with the expanded catalog; keep local SQLite and one-off probe scripts out of tree.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-26 13:40:46 +08:00

33 lines
912 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from 'react'
import ReactDOM from 'react-dom/client'
import { BrowserRouter } from 'react-router-dom'
import App from './App'
import './styles.css'
/** VIP 运营台 / Nomadro 微信台 / .com 三色隔离:hackrobot=紫,nomadro=绿 */
;(() => {
const h = window.location.hostname.toLowerCase()
const root = document.documentElement
if (h === 'admin.hackrobot.cn' || h.endsWith('.hackrobot.cn')) {
root.classList.add('brand-vip')
root.classList.remove('brand-nomadro')
} else {
root.classList.add('brand-nomadro')
root.classList.remove('brand-vip')
}
})()
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js').catch(() => {})
})
}
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</React.StrictMode>,
)