Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When company is a mention, link it #89

Merged
merged 1 commit into from
Jul 9, 2022
Merged

Conversation

golles
Copy link
Contributor

@golles golles commented Jul 9, 2022

Please advise if this is the best way of doing this.

@@ -42,6 +42,14 @@ const ListItem = ({ icon, title, value, link, skeleton = false }) => {
);
};

const isCompanyMention = (company) => {
return company.startsWith('@') && !company.includes(' ');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not fully sure what the exact rules are for a mention, I think a mention should start with a @ and cannot contain spaces.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks workable.

};

const companyLink = (company) => {
return `https://github.com/${company.substring(1)}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strip first character (@)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right.

Copy link
Owner

@arifszn arifszn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

LGTM. Will you add anything? If not, we can merge it.

@@ -42,6 +42,14 @@ const ListItem = ({ icon, title, value, link, skeleton = false }) => {
);
};

const isCompanyMention = (company) => {
return company.startsWith('@') && !company.includes(' ');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks workable.

};

const companyLink = (company) => {
return `https://github.com/${company.substring(1)}`;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right.

@golles
Copy link
Contributor Author

golles commented Jul 9, 2022

Nice one!

LGTM. Will you add anything? If not, we can merge it.

Thanks, this is all. You can merge it :-)

@arifszn arifszn merged commit 8901157 into arifszn:main Jul 9, 2022
@golles golles deleted the company-mention branch July 9, 2022 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants