Fixed link generator name and theme query string
This commit is contained in:
@@ -13,11 +13,19 @@ const githubStatsStylingQueryString = options => {
|
||||
return query_string
|
||||
}
|
||||
|
||||
const streakStatsStylingQueryString = options => {
|
||||
const params = {
|
||||
...(options.theme && options.theme !== "none") && { theme: options.theme },
|
||||
}
|
||||
const query_string = Object.entries(params).map(([key, value]) => `${key}=${value}`).join("&")
|
||||
return query_string
|
||||
}
|
||||
|
||||
export const githubStatsLinkGenerator = ({github, options}) =>
|
||||
`https://github-readme-stats.vercel.app/api?username=${github}&${githubStatsStylingQueryString(options)}`
|
||||
|
||||
export const topLanguagesLinkGenerator = ({github, options}) =>
|
||||
`https://github-readme-stats.vercel.app/api/top-langs?username=${github}&${githubStatsStylingQueryString(options)}&layout=compact`
|
||||
|
||||
export const githubStreakLinkGenerator = ({github, options}) =>
|
||||
`https://github-readme-streak-stats.herokuapp.com/?user=${github}`
|
||||
export const streakStatsLinkGenerator = ({github, options}) =>
|
||||
`https://github-readme-streak-stats.herokuapp.com/?user=${github}&${streakStatsStylingQueryString(options)}`
|
||||
Reference in New Issue
Block a user