Skip to content

Commit

Permalink
some bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ramory-l committed Jan 4, 2021
1 parent 9c7c09e commit d6dc081
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/matchesTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const MatchesTable = (props) => {
content: (user) => {
const tagsStr = user.tags
.map((tag) => {
return `#${tag.tag}`;
return `#${tag.name}`;
})
.join(", ");
return <HelpBox textInBox={tagsStr} text={user.tags.length} />;
Expand Down
16 changes: 2 additions & 14 deletions frontend/src/components/tagsInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,8 @@ const TagsInput = ({ userId, editMode, isSearchForm }) => {
? await getUserTags(getCurrentUser().sub)
: await getUserTags(userId);
const { data: suggestions } = await getTopTags();
const modifiedTags = tags.map((tagName) => {
return {
id: tagName.id,
name: tagName.tag,
};
});
const modifiedSuggestions = suggestions.map((tagName) => {
return {
id: tagName.id,
name: tagName.tag,
};
});
setTags(modifiedTags);
setSuggestions(modifiedSuggestions);
setTags(tags);
setSuggestions(suggestions);
};
fetchTags();
}, [userId, isSearchForm]);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/userAvatar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const UserAvatar = (props) => {
rateUpdateFunction={setRate}
isBlocked={isBlocked}
/>
{isMatch ? (
{isMatch && !isBlocked ? (
<LinkButton
to={`/messages/${user.username}`}
className="btn btn-info"
Expand All @@ -112,7 +112,7 @@ const UserAvatar = (props) => {
unblockUser(user.id);
setIsBlocked(false);
}}
className="btn btn-success"
className="btn btn-success mt-2"
>
Unblock
</button>
Expand Down

0 comments on commit d6dc081

Please sign in to comment.