File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,12 @@ const Dashboard = () => {
3030 const token = searchParams . get ( "token" ) ;
3131 const usernameFromUrl = searchParams . get ( "username" ) ;
3232
33+ // Skip if already logged in
34+ const isLoggedIn = localStorage . getItem ( "isLoggedIn" ) ;
35+ if ( isLoggedIn === "true" ) {
36+ return ;
37+ }
38+
3339 // Agar URL mein token hai, to yeh Google se login hokar aaya hai
3440 if ( token && usernameFromUrl ) {
3541 // Data ko localStorage mein save karein
@@ -171,9 +177,7 @@ const Dashboard = () => {
171177 < main className = "flex-1 p-6 mt-10" >
172178 { /* Header */ }
173179 < Header handleLogout = { handleLogout } /> { " " }
174-
175180 { /* Pass handleLogout to Header */ }
176-
177181 { /* Search Bar */ }
178182 < SearchBar searchTerm = { searchTerm } handleSearch = { handleSearch } />
179183 { /* New Today Section */ }
You can’t perform that action at this time.
0 commit comments