feat: add Ray-Ban display dashboard PoC (#226)
This commit is contained in:
@@ -2,6 +2,13 @@ import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
|
||||
import App from './App';
|
||||
import { GlassesApp } from './GlassesApp';
|
||||
|
||||
function isGlassesRoute(): boolean {
|
||||
const pathname = window.location.pathname.replace(/\/+$/, '') || '/';
|
||||
const search = new URLSearchParams(window.location.search);
|
||||
return pathname === '/glasses' || search.get('display') === 'rayban';
|
||||
}
|
||||
|
||||
const root = document.getElementById('root');
|
||||
|
||||
@@ -10,7 +17,5 @@ if (!root) {
|
||||
}
|
||||
|
||||
createRoot(root).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>,
|
||||
<StrictMode>{isGlassesRoute() ? <GlassesApp /> : <App />}</StrictMode>,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user