Spaces:
Sleeping
Sleeping
طيب لماذا عند الدخول بواسطة pwa https://protoworld.netlify.app/login لا
Browse files- src/app/group-chat/page.tsx +2 -1
- src/app/login/page.tsx +2 -1
- src/app/page.tsx +2 -1
- src/app/profile/page.tsx +2 -1
- src/app/voice-chat/page.tsx +2 -1
- src/app/world/page.tsx +2 -1
src/app/group-chat/page.tsx
CHANGED
|
@@ -15,7 +15,8 @@ export default function GroupChatPage() {
|
|
| 15 |
if (!loading && !user) {
|
| 16 |
router.push('/login');
|
| 17 |
}
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
// This loader is for the brief period while the redirect is happening.
|
| 21 |
if (!user) {
|
|
|
|
| 15 |
if (!loading && !user) {
|
| 16 |
router.push('/login');
|
| 17 |
}
|
| 18 |
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
| 19 |
+
}, [user, loading]);
|
| 20 |
|
| 21 |
// This loader is for the brief period while the redirect is happening.
|
| 22 |
if (!user) {
|
src/app/login/page.tsx
CHANGED
|
@@ -18,7 +18,8 @@ export default function LoginPage() {
|
|
| 18 |
if (!authLoading && user) {
|
| 19 |
router.push('/');
|
| 20 |
}
|
| 21 |
-
|
|
|
|
| 22 |
|
| 23 |
const handleGoogleLogin = async () => {
|
| 24 |
if (isSigningIn) return;
|
|
|
|
| 18 |
if (!authLoading && user) {
|
| 19 |
router.push('/');
|
| 20 |
}
|
| 21 |
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
| 22 |
+
}, [user, authLoading]);
|
| 23 |
|
| 24 |
const handleGoogleLogin = async () => {
|
| 25 |
if (isSigningIn) return;
|
src/app/page.tsx
CHANGED
|
@@ -20,7 +20,8 @@ export default function Home() {
|
|
| 20 |
if (!authLoading && !user) {
|
| 21 |
router.push('/login');
|
| 22 |
}
|
| 23 |
-
|
|
|
|
| 24 |
|
| 25 |
// This loader is for the brief period while the redirect is happening.
|
| 26 |
// It prevents a flicker of the page content before the redirect is complete.
|
|
|
|
| 20 |
if (!authLoading && !user) {
|
| 21 |
router.push('/login');
|
| 22 |
}
|
| 23 |
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
| 24 |
+
}, [user, authLoading]);
|
| 25 |
|
| 26 |
// This loader is for the brief period while the redirect is happening.
|
| 27 |
// It prevents a flicker of the page content before the redirect is complete.
|
src/app/profile/page.tsx
CHANGED
|
@@ -27,7 +27,8 @@ export default function ProfilePage() {
|
|
| 27 |
if (user) {
|
| 28 |
setDisplayName(user.displayName || '');
|
| 29 |
}
|
| 30 |
-
|
|
|
|
| 31 |
|
| 32 |
const handleSave = async () => {
|
| 33 |
if (!user) return;
|
|
|
|
| 27 |
if (user) {
|
| 28 |
setDisplayName(user.displayName || '');
|
| 29 |
}
|
| 30 |
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
| 31 |
+
}, [user, loading]);
|
| 32 |
|
| 33 |
const handleSave = async () => {
|
| 34 |
if (!user) return;
|
src/app/voice-chat/page.tsx
CHANGED
|
@@ -15,7 +15,8 @@ export default function VoiceChatPage() {
|
|
| 15 |
if (!loading && !user) {
|
| 16 |
router.push('/login');
|
| 17 |
}
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
// This loader is for the brief period while the redirect is happening.
|
| 21 |
if (!user) {
|
|
|
|
| 15 |
if (!loading && !user) {
|
| 16 |
router.push('/login');
|
| 17 |
}
|
| 18 |
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
| 19 |
+
}, [user, loading]);
|
| 20 |
|
| 21 |
// This loader is for the brief period while the redirect is happening.
|
| 22 |
if (!user) {
|
src/app/world/page.tsx
CHANGED
|
@@ -17,7 +17,8 @@ export default function AIWorldPage() {
|
|
| 17 |
if (!loading && !user) {
|
| 18 |
router.push('/login');
|
| 19 |
}
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
// This loader is for the brief period while the redirect is happening.
|
| 23 |
if (!user) {
|
|
|
|
| 17 |
if (!loading && !user) {
|
| 18 |
router.push('/login');
|
| 19 |
}
|
| 20 |
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
| 21 |
+
}, [user, loading]);
|
| 22 |
|
| 23 |
// This loader is for the brief period while the redirect is happening.
|
| 24 |
if (!user) {
|