File tree Expand file tree Collapse file tree
websites/rushstack.io/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ interface IGitHubCardProps {
66 person : IPersonJson ;
77}
88
9- const gitHubBaseUrl = 'https://github.com/' ;
10- const size : number = window . devicePixelRatio >= 2 ? 200 : 100 ;
9+ const GITHUB_BASE_URL = 'https://github.com/' ;
10+ const PROFILE_PHOTO_SIZE : number = 200 ;
1111
1212/**
1313 * Returns GitHub profile and avatar URLs for a given alias.
@@ -21,13 +21,13 @@ function getGitHubProfileInfo(githubAlias: string): { profileUrl: string; avatar
2121 return false ;
2222 }
2323
24- const urlBuilder = new URL ( gitHubBaseUrl ) ;
24+ const urlBuilder = new URL ( GITHUB_BASE_URL ) ;
2525
2626 urlBuilder . pathname = githubAlias ;
2727 const profileUrl = urlBuilder . toString ( ) ;
2828
2929 urlBuilder . pathname += '.png' ;
30- urlBuilder . searchParams . set ( 'size' , size . toString ( ) ) ;
30+ urlBuilder . searchParams . set ( 'size' , PROFILE_PHOTO_SIZE . toString ( ) ) ;
3131 const avatarUrl = urlBuilder . toString ( ) ;
3232
3333 return { profileUrl, avatarUrl } ;
You can’t perform that action at this time.
0 commit comments