upgrade to tamagui v2 and guest pwa overhaul
This commit is contained in:
25
resources/js/guest-v2/main.tsx
Normal file
25
resources/js/guest-v2/main.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import React from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import '@tamagui/core/reset.css';
|
||||
import '../../css/app.css';
|
||||
import { initializeTheme } from '@/hooks/use-appearance';
|
||||
import App from './App';
|
||||
|
||||
const rootElement = document.getElementById('root');
|
||||
|
||||
if (!rootElement) {
|
||||
throw new Error('Guest v2 root element not found.');
|
||||
}
|
||||
|
||||
initializeTheme();
|
||||
|
||||
if (typeof window !== 'undefined' && !window.localStorage.getItem('theme')) {
|
||||
window.localStorage.setItem('theme', 'light');
|
||||
initializeTheme();
|
||||
}
|
||||
|
||||
createRoot(rootElement).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>
|
||||
);
|
||||
Reference in New Issue
Block a user