@@ -4,15 +4,14 @@ import { onAuthStateChanged, type User } from 'firebase/auth';
44
55import "./App.css" ; // Ensure Tailwind is working
66
7-
8- import { auth } from './_libs/firebase' ;
9-
107import RootLayout from "./_components/layouts" ;
118
129import Home from "./_components/home" ;
13- import { Auth , Explore } from "./_components/socializing" ;
10+ import Auth from "./_components/auth" ;
11+ import { Explore } from "./_components/socializing" ;
1412import Goodbye from "./_components/goodbye" ;
1513
14+ import { auth } from './_libs/firebase' ;
1615import { useAuthDataStore } from "./_stores/user_auth_data" ;
1716
1817
@@ -34,23 +33,19 @@ const App = () => {
3433
3534 return (
3635 < Routes >
36+ { /* Auth route without layout */ }
37+ < Route path = "/get-started" element = { < Auth /> } />
38+
39+ { /* All other routes with RootLayout */ }
3740 < Route element = { < RootLayout /> } >
3841 < Route index element = { < Home /> } />
39- {
40- useAuthStore . signInData
41- ?
42- < >
43- < Route path = "/socialize/explore" element = { < Explore /> } />
44- </ >
45- :
46- < >
47- < Route path = "/socialize" element = { < Auth /> } />
48- </ >
49- }
42+ { useAuthStore . signInData && (
43+ < Route path = "/socialize/explore" element = { < Explore /> } />
44+ ) }
5045 < Route path = "/goodbye" element = { < Goodbye /> } />
51- { /* <Route path="/qr" element={<><QRCustomize /></>} /> */ }
52- < Route path = "*" element = { < div className = "grid place-items-center h-full text-3xl" > no chai here</ div > } />
5346 </ Route >
47+
48+ < Route path = "*" element = { < div className = "grid place-items-center h-full text-3xl" > no chai here</ div > } />
5449 </ Routes >
5550 ) ;
5651} ;
0 commit comments