Skip to content

Commit

Permalink
Merge pull request #572 from mojoee/addingHeader
Browse files Browse the repository at this point in the history
Adding header
  • Loading branch information
MrOrz authored Jul 21, 2024
2 parents 49ae7e9 + a01244d commit cccab71
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const CREATE_REPLY_REQUEST = gql`
mutation CreateReplyRequestFromForm($articleId: String!, $reason: String!) {
CreateReplyRequest(articleId: $articleId, reason: $reason) {
id
updatedAt
}
}
`;
Expand Down
18 changes: 17 additions & 1 deletion components/ReplyRequestReason/ReplyRequestReason.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import PropTypes from 'prop-types';
import { useMutation } from '@apollo/react-hooks';
import { makeStyles } from '@material-ui/core/styles';
import { Box, Button } from '@material-ui/core';
import TimeInfo from 'components/Infos/TimeInfo';
import Link from 'next/link';

Check failure on line 8 in components/ReplyRequestReason/ReplyRequestReason.js

View workflow job for this annotation

GitHub Actions / install-and-test

'Link' is defined but never used

import { ThumbUpIcon, ThumbDownIcon } from 'components/icons';
import Avatar from 'components/AppLayout/Widgets/Avatar';
Expand All @@ -22,6 +24,16 @@ const useStyles = makeStyles(theme => ({
borderTop: `1px solid ${theme.palette.secondary[100]}`,
},
},
header: {
display: 'flex',
alignItems: 'center',
marginBottom: 5,
},
user: {
margin: 0,
marginRight: 5,
fontWeight: 'bold',
},
reason: {
marginTop: 0,
},
Expand Down Expand Up @@ -61,7 +73,7 @@ const ReplyRequestInfo = gql`
reason
positiveFeedbackCount
negativeFeedbackCount
updatedAt
user {
id
name
Expand Down Expand Up @@ -113,6 +125,10 @@ function ReplyRequestReason({ replyRequest, articleId }) {
<Avatar user={user} size={40} />
</Box>
<Box flex={1} className={classes.reasonBody}>
<Box className={classes.header}>
<p className={classes.user}>{user.id}</p>
<TimeInfo time={replyRequest.updatedAt}/>

Check failure on line 130 in components/ReplyRequestReason/ReplyRequestReason.js

View workflow job for this annotation

GitHub Actions / install-and-test

Insert `·`
</Box>
<p className={classes.reason}>{replyRequestReason}</p>
<Box display="flex" justifyContent="space-between">
<Box display="flex">
Expand Down

0 comments on commit cccab71

Please sign in to comment.