mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-06 21:07:47 +00:00
[UwU] Remove unused types, fix Disqus types (#622)
This PR removes two TS types that were unused, and fixes various Disqus typings
This commit is contained in:
7
src/types/disqus.d.ts
vendored
Normal file
7
src/types/disqus.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
export {};
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface Window {
|
||||||
|
reloadDisqus: () => void;
|
||||||
|
}
|
||||||
|
}
|
||||||
9
src/types/ffg.d.ts
vendored
9
src/types/ffg.d.ts
vendored
@@ -1,9 +0,0 @@
|
|||||||
export {};
|
|
||||||
|
|
||||||
declare global {
|
|
||||||
interface Window {
|
|
||||||
rafThrottle<T extends (...props: any[]) => any>(
|
|
||||||
callback: T
|
|
||||||
): (...args: any[]) => void;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
declare module "gatsby-remark-embedder/dist/transformers/Twitch.js" {
|
|
||||||
import { Transformer } from "@remark-embedder/core";
|
|
||||||
|
|
||||||
const transformer: Transformer<any>;
|
|
||||||
export = transformer;
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,7 @@ const COLOR_MODE_STORAGE_KEY = "currentTheme";
|
|||||||
|
|
||||||
export const themeToggle = () => {
|
export const themeToggle = () => {
|
||||||
const themeToggleBtn: HTMLElement = document.querySelector(
|
const themeToggleBtn: HTMLElement = document.querySelector(
|
||||||
"#theme-toggle-button"
|
"#theme-toggle-button",
|
||||||
);
|
);
|
||||||
if (!themeToggleBtn) return;
|
if (!themeToggleBtn) return;
|
||||||
const darkIconEl: HTMLElement = document.querySelector("#dark-icon");
|
const darkIconEl: HTMLElement = document.querySelector("#dark-icon");
|
||||||
@@ -16,10 +16,7 @@ export const themeToggle = () => {
|
|||||||
lightIconEl.style.display = "none";
|
lightIconEl.style.display = "none";
|
||||||
darkIconEl.style.display = null;
|
darkIconEl.style.display = null;
|
||||||
}
|
}
|
||||||
setTimeout(
|
setTimeout(() => window.reloadDisqus && window.reloadDisqus(), 100);
|
||||||
() => (window as any).reloadDisqus && (window as any).reloadDisqus(),
|
|
||||||
100
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Migrate to `classList`
|
// TODO: Migrate to `classList`
|
||||||
|
|||||||
Reference in New Issue
Block a user