We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dedbb05 commit 2038c59Copy full SHA for 2038c59
1 file changed
app/(with-sidebar)/(home)/page.tsx
@@ -84,10 +84,14 @@ const Page = () => {
84
useEffect(() => {
85
if (currentUser) {
86
const loadData = async () => {
87
- const userProfile = await getProfile(currentUser.uid);
88
- setProfile(userProfile);
89
-
90
- await loadTodos(currentUser.uid);
+ try {
+ const userProfile = await getProfile(currentUser.uid);
+ setProfile(userProfile);
+ await loadTodos(currentUser.uid);
91
+ } catch (err) {
92
+ console.error(err);
93
+ setError('프로필 정보를 불러오는 데 실패하였습니다');
94
+ }
95
};
96
loadData();
97
} else {
0 commit comments