Skip to content

Commit

Permalink
Merge pull request #63 from sleepy-corpse/small-fix
Browse files Browse the repository at this point in the history
Fix user links
  • Loading branch information
vtm9 authored Jan 30, 2024
2 parents eae5915 + bf45e51 commit cc17b23
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/popup/components/UserName.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ const getName = ({ id, name }) => {
return name;
};

const codebattleUrl = 'https://codebattle.hexlet.io/';

const getUserLink = id => `${codebattleUrl}users/${id}`;

const UserName = ({ user }) => {
const userInfo = isValidUserInfo(user) ? user : 'errorValidInfo';

Expand All @@ -25,7 +29,7 @@ const UserName = ({ user }) => {
>
<div className="d-flex align-items-center">
<a
href={`/users/${id}`}
href={getUserLink(id)}
target="_ablank"
key={id}
className="d-flex align-items-center mr-1 text-truncate"
Expand Down

0 comments on commit cc17b23

Please sign in to comment.