File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1126,10 +1126,10 @@ export const ThemesList: Theme[] = Object.keys(themes)
11261126 } as Theme )
11271127 ) ;
11281128
1129- export function getSortedThemesList ( ) : Theme [ ] {
1130- return ThemesList . toSorted ( ( a , b ) => {
1129+ export const ThemesListSorted = [
1130+ ... ThemesList . sort ( ( a , b ) => {
11311131 const b1 = hexToHSL ( a . bgColor ) ;
11321132 const b2 = hexToHSL ( b . bgColor ) ;
11331133 return b2 . lgt - b1 . lgt ;
1134- } ) ;
1135- }
1134+ } ) ,
1135+ ] ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import {
1515 ThemeName ,
1616} from "@monkeytype/contracts/schemas/configs" ;
1717import { captureException } from "../../sentry" ;
18- import { getSortedThemesList } from "../../constants/themes" ;
18+ import { ThemesListSorted } from "../../constants/themes" ;
1919
2020function updateActiveButton ( ) : void {
2121 let activeThemeName : string = Config . theme ;
@@ -149,7 +149,7 @@ export async function refreshPresetButtons(): Promise<void> {
149149 activeThemeName = ThemeController . randomTheme ;
150150 }
151151
152- const themes = getSortedThemesList ( ) ;
152+ const themes = ThemesListSorted ;
153153
154154 //first show favourites
155155 if ( Config . favThemes . length > 0 ) {
You can’t perform that action at this time.
0 commit comments