Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions websites/rushstack.io/src/components/PeopleGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ interface IGitHubCardProps {
person: IPersonJson;
}

const gitHubBaseUrl = 'https://github.com/';
const size: number = window.devicePixelRatio >= 2 ? 200 : 100;
const GITHUB_BASE_URL = 'https://github.com/';
const PROFILE_PHOTO_SIZE: number = 200;
Comment thread
iclanton marked this conversation as resolved.

/**
* Returns GitHub profile and avatar URLs for a given alias.
Expand All @@ -21,13 +21,13 @@ function getGitHubProfileInfo(githubAlias: string): { profileUrl: string; avatar
return false;
}

const urlBuilder = new URL(gitHubBaseUrl);
const urlBuilder = new URL(GITHUB_BASE_URL);

urlBuilder.pathname = githubAlias;
const profileUrl = urlBuilder.toString();

urlBuilder.pathname += '.png';
urlBuilder.searchParams.set('size', size.toString());
urlBuilder.searchParams.set('size', PROFILE_PHOTO_SIZE.toString());
const avatarUrl = urlBuilder.toString();

return { profileUrl, avatarUrl };
Expand Down