File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
components/EditProfilePage Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ import { TestimoniesTab } from "./TestimoniesTab"
27
27
import { useFlags } from "components/featureFlags"
28
28
import { PendingUpgradeBanner } from "components/PendingUpgradeBanner"
29
29
30
+ import LoginPage from "components/Login/login"
31
+
30
32
const tabTitle = [ "about-you" , "testimonies" , "following" ] as const
31
33
export type TabTitles = ( typeof tabTitle ) [ number ]
32
34
@@ -39,14 +41,22 @@ export default function EditProfile({
39
41
const uid = user ?. uid
40
42
const result = useProfile ( )
41
43
42
- if ( result . loading ) {
44
+ if ( result . loading && uid ) {
43
45
return (
44
46
< Row >
45
47
< Spinner animation = "border" className = "mx-auto" />
46
48
</ Row >
47
49
)
48
50
}
49
51
52
+ if ( result . loading ) {
53
+ return (
54
+ < Row >
55
+ < LoginPage />
56
+ </ Row >
57
+ )
58
+ }
59
+
50
60
if ( result ?. profile && uid ) {
51
61
return (
52
62
< EditProfileForm
Original file line number Diff line number Diff line change @@ -14,10 +14,11 @@ const Query = z.object({
14
14
15
15
export default createPage ( {
16
16
title : "Edit Profile" ,
17
- Page : requireAuth ( ( { user } ) => {
17
+ Page : ( ) => {
18
+ // Page: requireAuth(({ user }) => {
18
19
const tabTitle = Query . parse ( useRouter ( ) . query ) . docName ?. [ 0 ] || "about-you"
19
20
return < EditProfile tabTitle = { tabTitle as TabTitles } />
20
- } )
21
+ }
21
22
} )
22
23
23
24
export const getStaticPaths : GetStaticPaths = async ctx => {
You can’t perform that action at this time.
0 commit comments