Skip to content

Commit

Permalink
return null when loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Kexogg committed Feb 18, 2024
1 parent 35fd9be commit 788b9b2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/Profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ const Profile = () => {
link: '/employee/' + id,
},
]
if (loading) return <div>loading...</div>
if (error) return <div>error</div>

if (error) return <div>{error.message}</div>
if (loading) return null
return (
<main className={styles.profile__container}>
<Breadcrumbs links={breadcrumbs} />
Expand Down

0 comments on commit 788b9b2

Please sign in to comment.