Skip to content

Commit 8d9d8bb

Browse files
committed
Log the error, rather than rendering it
Signed-off-by: Anil Vishnoi <[email protected]>
1 parent 9435276 commit 8d9d8bb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/Dashboard/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external
3131
const Index: React.FunctionComponent = () => {
3232
const { data: session } = useSession();
3333
const [pullRequests, setPullRequests] = React.useState<PullRequest[]>([]);
34-
const [error, setError] = React.useState<string | null>(null);
34+
//const [error, setError] = React.useState<string | null>(null);
3535
const router = useRouter();
3636

3737
const fetchAndSetPullRequests = React.useCallback(async () => {
@@ -52,7 +52,7 @@ const Index: React.FunctionComponent = () => {
5252

5353
setPullRequests(sortedPRs);
5454
} catch (error) {
55-
setError('Failed to fetch pull requests.');
55+
console.log('Failed to fetch pull requests.' + error);
5656
}
5757
}
5858
}, [session?.accessToken]);
@@ -109,7 +109,6 @@ const Index: React.FunctionComponent = () => {
109109
</PageSection>
110110
<PageSection>
111111
<div style={{ marginBottom: '20px' }} />
112-
{error && <div>{error}</div>}
113112
{pullRequests.length === 0 ? (
114113
<EmptyState>
115114
<EmptyStateHeader

0 commit comments

Comments
 (0)