MCPcopy
hub / github.com/monkeytypegame/monkeytype / clearPreview

Function clearPreview

frontend/src/ts/controllers/theme-controller.ts:153–168  ·  view source on GitHub ↗
(applyTheme = true)

Source from the content-addressed store, hash-verified

151}
152
153export async function clearPreview(applyTheme = true): Promise<void> {
154 previewState = null;
155
156 if (isPreviewingTheme) {
157 isPreviewingTheme = false;
158 if (applyTheme) {
159 if (randomTheme !== null) {
160 await apply(randomTheme);
161 } else if (Config.customTheme) {
162 await apply("custom");
163 } else {
164 await apply(Config.theme);
165 }
166 }
167 }
168}
169
170let themesList: (ThemeName | string)[] = [];
171

Callers 1

Calls 1

applyFunction · 0.70

Tested by

no test coverage detected