File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
[locale]/feeds/[feedDataType]/[feedId] Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,10 @@ import {
2424} from '../../../../screens/Feed/Feed.functions' ;
2525import generateFeedStructuredData from '../../../../screens/Feed/StructuredData.functions' ;
2626import { getTranslations } from 'next-intl/server' ;
27- import { getSSRAccessToken , getUserContextJwtFromCookie } from '../../../../utils/auth-server' ;
27+ import {
28+ getSSRAccessToken ,
29+ getUserContextJwtFromCookie ,
30+ } from '../../../../utils/auth-server' ;
2831
2932interface Props {
3033 params : Promise < { feedDataType : string ; feedId : string } > ;
Original file line number Diff line number Diff line change @@ -98,16 +98,18 @@ export default function DrawerAppBar(): React.ReactElement {
9898 React . useEffect ( ( ) => {
9999 const auth = app . auth ( ) ;
100100 const unsubscribe = auth . onAuthStateChanged ( async ( user ) => {
101- if ( user ) {
101+ if ( user != null ) {
102102 setCurrentUser ( {
103- email : user . email || '' ,
103+ email : user . email ?? '' ,
104104 isAuthenticated : ! user . isAnonymous ,
105105 } ) ;
106106 } else {
107107 setCurrentUser ( undefined ) ;
108108 }
109109 } ) ;
110- return ( ) => unsubscribe ( ) ;
110+ return ( ) => {
111+ unsubscribe ( ) ;
112+ } ;
111113 } , [ ] ) ;
112114
113115 React . useEffect ( ( ) => {
@@ -126,8 +128,7 @@ export default function DrawerAppBar(): React.ReactElement {
126128
127129 const router = useRouter ( ) ;
128130
129- const isAuthenticated =
130- currentUser != null && currentUser . isAuthenticated === true ;
131+ const isAuthenticated = currentUser != null && currentUser . isAuthenticated ;
131132 const userEmail = currentUser ?. email ;
132133
133134 const handleDrawerToggle = ( ) : void => {
You can’t perform that action at this time.
0 commit comments