last one I promise

This commit is contained in:
Nuckyz 2024-09-18 14:48:18 -03:00
parent 5dbe81e459
commit b1f3925361
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 3 additions and 4 deletions

View file

@ -26,7 +26,7 @@ import definePlugin, { OptionType } from "@utils/types";
import { Menu, ReactDOM } from "@webpack/common";
import type { Root } from "react-dom/client";
import { Magnifier, MagnifierProps } from "./components/Magnifier";
import { Magnifier } from "./components/Magnifier";
import { ELEMENT_ID } from "./constants";
import styles from "./styles.css?managed";
@ -201,7 +201,7 @@ export default definePlugin({
},
// to stop from rendering twice /shrug
currentMagnifierElement: null as React.FunctionComponentElement<MagnifierProps & JSX.IntrinsicAttributes> | null,
currentMagnifierElement: null as React.ReactNode,
element: null as HTMLDivElement | null,
Magnifier,

View file

@ -13,7 +13,6 @@ import definePlugin, { OptionType } from "@utils/types";
import { findComponentByCode } from "@webpack";
import { ChannelStore, GuildMemberStore, i18n, Text, Tooltip } from "@webpack/common";
import { Message } from "discord-types/general";
import { FunctionComponent, ReactNode } from "react";
const CountDown = findComponentByCode(".MAX_AGE_NEVER");
@ -75,7 +74,7 @@ export default definePlugin({
}
],
TooltipWrapper: ErrorBoundary.wrap(({ message, children, text }: { message: Message; children: FunctionComponent<any>; text: ReactNode; }) => {
TooltipWrapper: ErrorBoundary.wrap(({ message, children, text }: { message: Message; children: React.FunctionComponent<AnyRecord>; text: React.ReactNode; }) => {
if (settings.store.displayStyle === DisplayStyle.Tooltip) return <Tooltip
children={children}
text={renderTimeout(message, false)}