From 45404b70773fe5911a7764f68ff81cc473f4f92b Mon Sep 17 00:00:00 2001 From: wafuwafu13 Date: Sun, 4 Jul 2021 11:03:21 +0900 Subject: [PATCH] Fix Cannnot read property 'me' of undefined --- .../photo-share-client/src/AuthorizedUser.js | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/chapter-06/photo-share-client/src/AuthorizedUser.js b/chapter-06/photo-share-client/src/AuthorizedUser.js index 6ae0cf5..9cde055 100644 --- a/chapter-06/photo-share-client/src/AuthorizedUser.js +++ b/chapter-06/photo-share-client/src/AuthorizedUser.js @@ -18,17 +18,17 @@ const CurrentUser = ({ name, avatar, logout }) => const Me = ({ logout, requestCode, signingIn }) => - - {({ loading, data }) => data.me ? - : - loading ? -

loading...

: - - } -
+ + {({ loading, data }) => loading ? +

loading...

: + data.me ? + : + + } +
class AuthorizedUser extends Component {