diff --git a/Contributors.md b/Contributors.md new file mode 100644 index 0000000..049aa0a --- /dev/null +++ b/Contributors.md @@ -0,0 +1,5 @@ +# name + +## ThankGod munachimso Agu + +## frontEnd developer diff --git a/src/components/UserDetails/UserDetails.tsx b/src/components/UserDetails/UserDetails.tsx index 0c74e65..6341c6f 100644 --- a/src/components/UserDetails/UserDetails.tsx +++ b/src/components/UserDetails/UserDetails.tsx @@ -5,11 +5,23 @@ import { GoIssueOpened } from '@react-icons/all-files/go/GoIssueOpened' import { GoGitPullRequest } from '@react-icons/all-files/go/GoGitPullRequest' import { UserDetails_user$key } from '__generated__/UserDetails_user.graphql' +type GitContributionStats = { + issues: number; + pullRequests: number; +} + +type User = { + id: string; + handle: string; + avatar: string; + gitContributionStats: GitContributionStats; +} + type Props = { user: UserDetails_user$key } -const UserDetails = ({ user }: Props) => { +const UserDetails = ({ user }: Props): JSX.Element => { const data = useFragment( graphql` fragment UserDetails_user on User { diff --git a/src/pages/_error.js b/src/pages/_error.js index 66488b6..a88897b 100644 --- a/src/pages/_error.js +++ b/src/pages/_error.js @@ -19,21 +19,30 @@ import * as Sentry from '@sentry/nextjs' import NextErrorComponent from 'next/error' -const CustomErrorComponent = (props) => { - // If you're using a Nextjs version prior to 12.2.1, uncomment this to - // compensate for https://github.com/vercel/next.js/issues/8592 - // Sentry.captureUnderscoreErrorException(props); +const CustomErrorComponent = ({ statusCode, error }) => { + if (statusCode === 404) { + return