Skip to content

Commit d44f3bd

Browse files
authored
Merge pull request #31 from LAKSHYA9941/main
Auth/Login page
2 parents 2a7105b + 778dcbe commit d44f3bd

File tree

9 files changed

+252
-190
lines changed

9 files changed

+252
-190
lines changed

webapp_front/package-lock.json

Lines changed: 64 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webapp_front/src/App.tsx

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ import { onAuthStateChanged, type User } from 'firebase/auth';
44

55
import "./App.css"; // Ensure Tailwind is working
66

7-
8-
import { auth } from './_libs/firebase';
9-
107
import RootLayout from "./_components/layouts";
118

129
import Home from "./_components/home";
13-
import { Auth, Explore } from "./_components/socializing";
10+
import Auth from "./_components/auth";
11+
import { Explore } from "./_components/socializing";
1412
import Goodbye from "./_components/goodbye";
1513

14+
import { auth } from './_libs/firebase';
1615
import { 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

Comments
 (0)