diff --git a/src/components/FullPlayground.tsx b/src/components/FullPlayground.tsx index 6364620..f7bd447 100644 --- a/src/components/FullPlayground.tsx +++ b/src/components/FullPlayground.tsx @@ -602,7 +602,7 @@ export function ThemedAppView(props: { datastore: DataStore }) { >(undefined); const conductValidation = () => { - validationService.conductValidation((validated: boolean) => { + validationService.conductValidation(() => { return false; }); }; diff --git a/src/playground-ui/ConfirmDialog.tsx b/src/playground-ui/ConfirmDialog.tsx index 1057003..b541d3f 100644 --- a/src/playground-ui/ConfirmDialog.tsx +++ b/src/playground-ui/ConfirmDialog.tsx @@ -8,7 +8,7 @@ import DialogTitle from "@material-ui/core/DialogTitle"; import TextField from "@material-ui/core/TextField"; import React, { useState } from "react"; -export type ConfirmValue = "undefined" | "load" | "replace" +export type ConfirmValue = "undefined" | "load" | "replace" | "nevermind" /** * ConfirmDialogButton is a button in the confirm dialog. diff --git a/src/playground-ui/DiscordChatCrate.tsx b/src/playground-ui/DiscordChatCrate.tsx index 98ecdf5..47de5d6 100644 --- a/src/playground-ui/DiscordChatCrate.tsx +++ b/src/playground-ui/DiscordChatCrate.tsx @@ -58,7 +58,7 @@ const loadFromCDN = () => script.src = CDN_URL; document.head.appendChild(script); - script.onload = () => resolve((window as any).Crate); + script.onload = () => resolve(window.Crate); script.onerror = () => reject('Failed to load Crate!'); }); diff --git a/src/playground-ui/GoogleAnalyticsHook.tsx b/src/playground-ui/GoogleAnalyticsHook.tsx index 793998a..85a5e53 100644 --- a/src/playground-ui/GoogleAnalyticsHook.tsx +++ b/src/playground-ui/GoogleAnalyticsHook.tsx @@ -2,8 +2,8 @@ import { useEffect } from 'react'; declare global { interface Window { - gtag: (kind: string, subkind: any, data?: Record) => any - dataLayer: any[]; + gtag: (kind: string, subkind: object | string, data?: Record) => object + dataLayer: object[]; } } @@ -36,6 +36,9 @@ export const useGoogleAnalytics = (measurementId?: string) => { if (measurementId && !tagInjected) { // Configure Tags Manager. window.dataLayer = window.dataLayer || []; + // As of 2025-01 we're probably going to get rid of this file soon in favor + // of GTM. + // eslint-disable-next-line prefer-rest-params window.gtag = window.gtag || function () { window.dataLayer.push(arguments) }; window.gtag('js', new Date()); window.gtag('config', measurementId); @@ -54,25 +57,25 @@ export const useGoogleAnalytics = (measurementId?: string) => { } }); - const pushEvent = (eventName: string, eventParams: Record) => { + const pushEvent = (eventName: string, eventParams: Record) => { if (!tagInjected) { return } window.gtag('event', eventName, eventParams); }; - const setValue = (valueKey: string, value: Record) => { + const setValue = (valueKey: string, value: Record) => { if (!tagInjected) { return } window.gtag('set', valueKey, value); }; - const setUser = (userData: Record) => { + const setUser = (userData: Record) => { if (userSet) { return; } setValue('user', userData); userSet = true; }; return { initialized: !!measurementId, setValue: setValue, pushEvent: pushEvent, setUser: setUser }; -}; \ No newline at end of file +}; diff --git a/src/playground-ui/TabPanel.tsx b/src/playground-ui/TabPanel.tsx index 38bf117..6188164 100644 --- a/src/playground-ui/TabPanel.tsx +++ b/src/playground-ui/TabPanel.tsx @@ -12,12 +12,12 @@ export interface TabPanelProps { /** * index is the index for which, if the value matches, the tab is displayed. */ - index: any; + index: string; /** * value is the current tab value. */ - value: any; + value: string; /** * className is the custom classname for the TabPanel.