Skip to content

Commit 6773393

Browse files
committed
add eror handling
1 parent db4337b commit 6773393

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/Issue/IssueList/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ const Issues = ({
107107
return <Loading />;
108108
}
109109

110+
if (!repository.issues.edges.length) {
111+
return <div className="IssueList">No issues ...</div>;
112+
}
113+
110114
return (
111115
<IssueList
112116
issues={repository.issues}

src/Organization/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const Organization = ({ organizationName }) => (
4242
const { organization } = data;
4343

4444
if (loading && !organization) {
45-
return <Loading />;
45+
return <Loading isCenter={true} />;
4646
}
4747

4848
return (

src/Profile/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ const Profile = () => (
3636
notifyOnNetworkStatusChange={true}
3737
>
3838
{({ data, loading, error, fetchMore }) => {
39-
if (error) {
40-
return <ErrorMessage error={error} />;
41-
}
42-
4339
const { viewer } = data;
4440

4541
if (loading && !viewer) {
46-
return <Loading />;
42+
return <Loading isCenter={true} />;
43+
}
44+
45+
if (error) {
46+
return <ErrorMessage error={error} />;
4747
}
4848

4949
return (

0 commit comments

Comments
 (0)