Skip to content

Commit 5f904a3

Browse files
authored
Merge pull request #39 from HusseinSerag/FEAT-github-profile-pic
feat: get theme author profile picture
2 parents b3e7fa8 + ee4047e commit 5f904a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/services/themeService.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const getGitHubThemeData = async (apiTheme: ApiTheme) => {
1616
const meta = await (await fetch(metaUrl)).json();
1717

1818
const contentUrl = `${cdnUrl}/${themeId}/${meta.version}`;
19+
1920
// fetch contents
2021
const displayFile = 'display.png';
2122
const settingsFile = 'settings.json';
@@ -28,7 +29,8 @@ const getGitHubThemeData = async (apiTheme: ApiTheme) => {
2829
const cssStylesUrl = `${contentUrl}/${cssStylesFile}`;
2930

3031
// todo: fetch from github url (can use jsdelivr cache too)
31-
const authorImg = '';
32+
33+
const authorImg = `https://avatars.githubusercontent.com/${meta.github}`
3234

3335
// todo: explore whether tags should be stored in database or via meta.json on github
3436
const tags = ['beta'];

0 commit comments

Comments
 (0)