mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 20:00:25 +00:00
Refactor utils.jsx
This commit is contained in:
@@ -136,11 +136,11 @@ export const sanitizeConfig = (config) => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
github: {
|
github: {
|
||||||
username: config.github.username,
|
username: config?.github?.username || '',
|
||||||
sortBy: config.github.sortBy || 'stars',
|
sortBy: config?.github?.sortBy || 'stars',
|
||||||
limit: config.github.limit || 8,
|
limit: config?.github?.limit || 8,
|
||||||
exclude: {
|
exclude: {
|
||||||
forks: config?.github?.exclude?.forks,
|
forks: config?.github?.exclude?.forks || false,
|
||||||
projects: config?.github?.exclude?.projects || [],
|
projects: config?.github?.exclude?.projects || [],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -174,8 +174,9 @@ export const sanitizeConfig = (config) => {
|
|||||||
},
|
},
|
||||||
themeConfig: {
|
themeConfig: {
|
||||||
defaultTheme: config?.themeConfig?.defaultTheme || themes[0],
|
defaultTheme: config?.themeConfig?.defaultTheme || themes[0],
|
||||||
disableSwitch: config?.themeConfig?.disableSwitch,
|
disableSwitch: config?.themeConfig?.disableSwitch || false,
|
||||||
respectPrefersColorScheme: config?.themeConfig?.respectPrefersColorScheme,
|
respectPrefersColorScheme:
|
||||||
|
config?.themeConfig?.respectPrefersColorScheme || false,
|
||||||
themes: themes,
|
themes: themes,
|
||||||
customTheme: customTheme,
|
customTheme: customTheme,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user