aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/identity
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/pages/identity')
-rw-r--r--webui/src/pages/identity/BugList.tsx9
-rw-r--r--webui/src/pages/identity/GetBugsByUser.graphql20
-rw-r--r--webui/src/pages/identity/GetUserStatistic.graphql8
-rw-r--r--webui/src/pages/identity/Identity.tsx25
-rw-r--r--webui/src/pages/identity/IdentityQuery.tsx16
5 files changed, 42 insertions, 36 deletions
diff --git a/webui/src/pages/identity/BugList.tsx b/webui/src/pages/identity/BugList.tsx
index fbddb0fe..a7c37a32 100644
--- a/webui/src/pages/identity/BugList.tsx
+++ b/webui/src/pages/identity/BugList.tsx
@@ -1,8 +1,6 @@
-import React from 'react';
-
-import { Card, Divider, Link, Typography } from '@material-ui/core';
-import CircularProgress from '@material-ui/core/CircularProgress';
-import { makeStyles } from '@material-ui/core/styles';
+import { Card, Divider, Link, Typography } from '@mui/material';
+import CircularProgress from '@mui/material/CircularProgress';
+import makeStyles from '@mui/styles/makeStyles';
import Date from '../../components/Date';
@@ -49,6 +47,7 @@ function BugList({ id }: Props) {
className={classes.bugLink}
href={'/bug/' + bug.id}
color={'inherit'}
+ underline="hover"
>
{bug.title}
</Link>
diff --git a/webui/src/pages/identity/GetBugsByUser.graphql b/webui/src/pages/identity/GetBugsByUser.graphql
index 0f170dc1..38f139ab 100644
--- a/webui/src/pages/identity/GetBugsByUser.graphql
+++ b/webui/src/pages/identity/GetBugsByUser.graphql
@@ -1,12 +1,12 @@
-query GetBugsByUser ($query: String){
- repository {
- allBugs(query: $query) {
- nodes {
- id
- title
- createdAt
- lastEdit
- }
- }
+query GetBugsByUser($query: String) {
+ repository {
+ allBugs(query: $query) {
+ nodes {
+ id
+ title
+ createdAt
+ lastEdit
+ }
}
+ }
}
diff --git a/webui/src/pages/identity/GetUserStatistic.graphql b/webui/src/pages/identity/GetUserStatistic.graphql
index 318b860d..a7598320 100644
--- a/webui/src/pages/identity/GetUserStatistic.graphql
+++ b/webui/src/pages/identity/GetUserStatistic.graphql
@@ -1,8 +1,12 @@
-query GetUserStatistic($authorQuery: String!, $participantQuery: String!, $actionQuery: String!) {
+query GetUserStatistic(
+ $authorQuery: String!
+ $participantQuery: String!
+ $actionQuery: String!
+) {
repository {
authored: allBugs(query: $authorQuery) {
totalCount
- },
+ }
participated: allBugs(query: $participantQuery) {
totalCount
}
diff --git a/webui/src/pages/identity/Identity.tsx b/webui/src/pages/identity/Identity.tsx
index 5170eeea..19b80b1c 100644
--- a/webui/src/pages/identity/Identity.tsx
+++ b/webui/src/pages/identity/Identity.tsx
@@ -1,14 +1,12 @@
-import React from 'react';
+import InfoIcon from '@mui/icons-material/Info';
+import MailOutlineIcon from '@mui/icons-material/MailOutline';
+import { Link, Paper, Typography } from '@mui/material';
+import Avatar from '@mui/material/Avatar';
+import CircularProgress from '@mui/material/CircularProgress';
+import Grid from '@mui/material/Grid';
+import makeStyles from '@mui/styles/makeStyles';
import { Link as RouterLink } from 'react-router-dom';
-import { Link, Paper, Typography } from '@material-ui/core';
-import Avatar from '@material-ui/core/Avatar';
-import CircularProgress from '@material-ui/core/CircularProgress';
-import Grid from '@material-ui/core/Grid';
-import { makeStyles } from '@material-ui/core/styles';
-import InfoIcon from '@material-ui/icons/Info';
-import MailOutlineIcon from '@material-ui/icons/MailOutline';
-
import { IdentityFragment } from '../../components/Identity/IdentityFragment.generated';
import { useGetUserStatisticQuery } from './GetUserStatistic.generated';
@@ -99,7 +97,11 @@ const Identity = ({ identity }: Props) => {
}}
>
<MailOutlineIcon />
- <Link href={'mailto:' + user?.email} color={'inherit'}>
+ <Link
+ href={'mailto:' + user?.email}
+ color={'inherit'}
+ underline="hover"
+ >
{user?.email}
</Link>
</Typography>
@@ -113,6 +115,7 @@ const Identity = ({ identity }: Props) => {
component={RouterLink}
to={`/?q=author%3A${user?.id}+sort%3Acreation`}
color={'inherit'}
+ underline="hover"
>
<Typography variant="subtitle1">
Created {authoredCount} bugs.
@@ -122,6 +125,7 @@ const Identity = ({ identity }: Props) => {
component={RouterLink}
to={`/?q=participant%3A${user?.id}+sort%3Acreation`}
color={'inherit'}
+ underline="hover"
>
<Typography variant="subtitle1">
Participated to {participatedCount} bugs.
@@ -131,6 +135,7 @@ const Identity = ({ identity }: Props) => {
component={RouterLink}
to={`/?q=actor%3A${user?.id}+sort%3Acreation`}
color={'inherit'}
+ underline="hover"
>
<Typography variant="subtitle1">
Interacted with {actionCount} bugs.
diff --git a/webui/src/pages/identity/IdentityQuery.tsx b/webui/src/pages/identity/IdentityQuery.tsx
index 964a9bac..382116ca 100644
--- a/webui/src/pages/identity/IdentityQuery.tsx
+++ b/webui/src/pages/identity/IdentityQuery.tsx
@@ -1,19 +1,17 @@
-import React from 'react';
-import { RouteComponentProps } from 'react-router-dom';
-
-import CircularProgress from '@material-ui/core/CircularProgress';
+import CircularProgress from '@mui/material/CircularProgress';
+import * as React from 'react';
+import { useParams } from 'react-router-dom';
import { useGetUserByIdQuery } from '../../components/Identity/UserIdentity.generated';
import Identity from './Identity';
-type Props = RouteComponentProps<{
- id: string;
-}>;
+const UserQuery: React.FC = () => {
+ const params = useParams<'id'>();
+ if (params.id === undefined) throw new Error('missing route parameters');
-const UserQuery: React.FC<Props> = ({ match }: Props) => {
const { loading, error, data } = useGetUserByIdQuery({
- variables: { userId: match.params.id },
+ variables: { userId: params.id },
});
if (loading) return <CircularProgress />;
if (error) return <p>Error: {error}</p>;