- {(tooltipProps: any) => (
-
- )}
-
- );
- };
+ return ({ color, tooltip, small }: { color: string; tooltip: string; small: boolean; }) => (
+
+ {(tooltipProps: any) => (
+
+ )}
+
+ );
}
const Icons = {
diff --git a/src/plugins/readAllNotificationsButton/index.tsx b/src/plugins/readAllNotificationsButton/index.tsx
index 9b1c9dfb..b5b0b5f8 100644
--- a/src/plugins/readAllNotificationsButton/index.tsx
+++ b/src/plugins/readAllNotificationsButton/index.tsx
@@ -19,7 +19,7 @@
import { addServerListElement, removeServerListElement, ServerListRenderPosition } from "@api/ServerList";
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
-import { Button, FluxDispatcher, GuildChannelStore, GuildStore, ReadStateStore } from "@webpack/common";
+import { Button, FluxDispatcher, GuildChannelStore, GuildStore, React, ReadStateStore } from "@webpack/common";
function onClick() {
const channels: Array = [];
diff --git a/src/plugins/sendTimestamps/index.tsx b/src/plugins/sendTimestamps/index.tsx
index 3ef4022d..7904545c 100644
--- a/src/plugins/sendTimestamps/index.tsx
+++ b/src/plugins/sendTimestamps/index.tsx
@@ -172,7 +172,7 @@ export default definePlugin({
height="24"
viewBox="0 0 24 24"
>
-
+
diff --git a/src/plugins/serverProfile/GuildProfileModal.tsx b/src/plugins/serverProfile/GuildProfileModal.tsx
index 2fe4dc0c..80f0842b 100644
--- a/src/plugins/serverProfile/GuildProfileModal.tsx
+++ b/src/plugins/serverProfile/GuildProfileModal.tsx
@@ -236,7 +236,6 @@ function UserList(type: "friends" | "blocked", guild: Guild, ids: string[], setC
{members.map(id =>
openUserProfile(id)}
diff --git a/src/plugins/shikiCodeblocks.desktop/components/Code.tsx b/src/plugins/shikiCodeblocks.desktop/components/Code.tsx
index e151df20..ce6a7058 100644
--- a/src/plugins/shikiCodeblocks.desktop/components/Code.tsx
+++ b/src/plugins/shikiCodeblocks.desktop/components/Code.tsx
@@ -46,7 +46,7 @@ export const Code = ({
.split("\n")
.map((line, i) => );
} catch {
- lines = content.split("\n").map((line, i) => {line});
+ lines = content.split("\n").map(line => {line});
}
} else {
const renderTokens =
@@ -55,11 +55,11 @@ export const Code = ({
.split("\n")
.map(line => [{ color: theme.plainColor, content: line } as IThemedToken]);
- lines = renderTokens.map((line, i) => {
+ lines = renderTokens.map(line => {
// [Cynthia] this makes it so when you highlight the codeblock
// empty lines are also selected and copied when you Ctrl+C.
if (line.length === 0) {
- return {"\n"};
+ return {"\n"};
}
return (
diff --git a/src/plugins/shikiCodeblocks.desktop/components/Highlighter.tsx b/src/plugins/shikiCodeblocks.desktop/components/Highlighter.tsx
index e14171e5..dd140193 100644
--- a/src/plugins/shikiCodeblocks.desktop/components/Highlighter.tsx
+++ b/src/plugins/shikiCodeblocks.desktop/components/Highlighter.tsx
@@ -18,7 +18,7 @@
import ErrorBoundary from "@components/ErrorBoundary";
import { useAwaiter, useIntersection } from "@utils/react";
-import { hljs } from "@webpack/common";
+import { hljs, React } from "@webpack/common";
import { resolveLang } from "../api/languages";
import { shiki } from "../api/shiki";
diff --git a/src/plugins/showConnections/index.tsx b/src/plugins/showConnections/index.tsx
index e7963a76..948bdb83 100644
--- a/src/plugins/showConnections/index.tsx
+++ b/src/plugins/showConnections/index.tsx
@@ -105,7 +105,7 @@ function ConnectionsComponent({ id, theme }: { id: string, theme: string; }) {
gap: getSpacingPx(settings.store.iconSpacing),
flexWrap: "wrap"
}}>
- {connections.map(connection => )}
+ {connections.map(connection => )}
);
diff --git a/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx b/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx
index ebd42580..26efce1d 100644
--- a/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx
+++ b/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx
@@ -275,7 +275,7 @@ function HiddenChannelLockScreen({ channel }: { channel: ExtendedChannel; }) {
Available tags:
- {availableTags.map(tag => )}
+ {availableTags.map(tag => )}
}
diff --git a/src/plugins/silentMessageToggle/index.tsx b/src/plugins/silentMessageToggle/index.tsx
index 6d2b9c3b..a1ee8de8 100644
--- a/src/plugins/silentMessageToggle/index.tsx
+++ b/src/plugins/silentMessageToggle/index.tsx
@@ -88,7 +88,7 @@ function SilentMessageToggle(chatBoxProps: {
- {!enabled && }
+ {!enabled && }
diff --git a/src/plugins/silentTyping/index.tsx b/src/plugins/silentTyping/index.tsx
index 134cfa67..dae7ad4c 100644
--- a/src/plugins/silentTyping/index.tsx
+++ b/src/plugins/silentTyping/index.tsx
@@ -21,7 +21,7 @@ import { definePluginSettings } from "@api/Settings";
import ErrorBoundary from "@components/ErrorBoundary";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
-import { Button, ButtonLooks, ButtonWrapperClasses, FluxDispatcher, Tooltip } from "@webpack/common";
+import { Button, ButtonLooks, ButtonWrapperClasses, FluxDispatcher, React, Tooltip } from "@webpack/common";
const settings = definePluginSettings({
showIcon: {
@@ -62,7 +62,7 @@ function SilentTypingToggle(chatBoxProps: {
diff --git a/src/plugins/spotifyControls/PlayerComponent.tsx b/src/plugins/spotifyControls/PlayerComponent.tsx
index 64ee52fc..43c499ab 100644
--- a/src/plugins/spotifyControls/PlayerComponent.tsx
+++ b/src/plugins/spotifyControls/PlayerComponent.tsx
@@ -38,21 +38,19 @@ function msToHuman(ms: number) {
}
function Svg(path: string, label: string) {
- return function Icon() {
- return (
-
- );
- };
+ return () => (
+
+ );
}
// KraXen's icons :yesyes:
diff --git a/src/plugins/startupTimings/StartupTimingPage.tsx b/src/plugins/startupTimings/StartupTimingPage.tsx
index 0950b068..c8cf51da 100644
--- a/src/plugins/startupTimings/StartupTimingPage.tsx
+++ b/src/plugins/startupTimings/StartupTimingPage.tsx
@@ -120,8 +120,8 @@ function ServerTrace({ trace }: ServerTraceProps) {
- {lines.map((line, i) => (
- {line}
+ {lines.map(line => (
+ {line}
))}
diff --git a/src/plugins/typingTweaks/index.tsx b/src/plugins/typingTweaks/index.tsx
index ccb863ce..62bcd41f 100644
--- a/src/plugins/typingTweaks/index.tsx
+++ b/src/plugins/typingTweaks/index.tsx
@@ -21,7 +21,7 @@ import ErrorBoundary from "@components/ErrorBoundary";
import { Devs } from "@utils/constants";
import { openUserProfile } from "@utils/discord";
import definePlugin, { OptionType } from "@utils/types";
-import { Avatar, GuildMemberStore, RelationshipStore } from "@webpack/common";
+import { Avatar, GuildMemberStore, React, RelationshipStore } from "@webpack/common";
import { User } from "discord-types/general";
const settings = definePluginSettings({
@@ -135,7 +135,7 @@ export default definePlugin({
return children.map(c =>
c.type === "strong"
- ?
+ ?
: c
);
}
diff --git a/src/utils/react.tsx b/src/utils/react.tsx
index 43a4d121..0181c95b 100644
--- a/src/utils/react.tsx
+++ b/src/utils/react.tsx
@@ -133,7 +133,7 @@ export function useForceUpdater(withDep?: true) {
export function LazyComponent(factory: () => React.ComponentType, attempts = 5) {
const get = makeLazy(factory, attempts);
- return function Lazy(props: T) {
+ return (props: T) => {
const Component = get() ?? NoopComponent;
return ;
};