mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-26 09:16:24 +00:00
last one I promise
This commit is contained in:
parent
5dbe81e459
commit
b1f3925361
2 changed files with 3 additions and 4 deletions
|
@ -26,7 +26,7 @@ import definePlugin, { OptionType } from "@utils/types";
|
||||||
import { Menu, ReactDOM } from "@webpack/common";
|
import { Menu, ReactDOM } from "@webpack/common";
|
||||||
import type { Root } from "react-dom/client";
|
import type { Root } from "react-dom/client";
|
||||||
|
|
||||||
import { Magnifier, MagnifierProps } from "./components/Magnifier";
|
import { Magnifier } from "./components/Magnifier";
|
||||||
import { ELEMENT_ID } from "./constants";
|
import { ELEMENT_ID } from "./constants";
|
||||||
import styles from "./styles.css?managed";
|
import styles from "./styles.css?managed";
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
|
|
||||||
// to stop from rendering twice /shrug
|
// 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,
|
element: null as HTMLDivElement | null,
|
||||||
|
|
||||||
Magnifier,
|
Magnifier,
|
||||||
|
|
|
@ -13,7 +13,6 @@ import definePlugin, { OptionType } from "@utils/types";
|
||||||
import { findComponentByCode } from "@webpack";
|
import { findComponentByCode } from "@webpack";
|
||||||
import { ChannelStore, GuildMemberStore, i18n, Text, Tooltip } from "@webpack/common";
|
import { ChannelStore, GuildMemberStore, i18n, Text, Tooltip } from "@webpack/common";
|
||||||
import { Message } from "discord-types/general";
|
import { Message } from "discord-types/general";
|
||||||
import { FunctionComponent, ReactNode } from "react";
|
|
||||||
|
|
||||||
const CountDown = findComponentByCode(".MAX_AGE_NEVER");
|
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
|
if (settings.store.displayStyle === DisplayStyle.Tooltip) return <Tooltip
|
||||||
children={children}
|
children={children}
|
||||||
text={renderTimeout(message, false)}
|
text={renderTimeout(message, false)}
|
||||||
|
|
Loading…
Reference in a new issue