(
-
- {(tooltipProps: any) => (
-
- )}
-
- );
+ return function PlatformIndicator({ color, tooltip, small }: { color: string; tooltip: string; small: boolean; }) {
+ return (
+
+ {(tooltipProps: any) => (
+
+ )}
+
+ );
+ };
}
const Icons = {
diff --git a/src/plugins/readAllNotificationsButton/index.tsx b/src/plugins/readAllNotificationsButton/index.tsx
index b5b0b5f8..9b1c9dfb 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, React, ReadStateStore } from "@webpack/common";
+import { Button, FluxDispatcher, GuildChannelStore, GuildStore, ReadStateStore } from "@webpack/common";
function onClick() {
const channels: Array = [];
diff --git a/src/plugins/sendTimestamps/index.tsx b/src/plugins/sendTimestamps/index.tsx
index 7904545c..3ef4022d 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 80f0842b..2fe4dc0c 100644
--- a/src/plugins/serverProfile/GuildProfileModal.tsx
+++ b/src/plugins/serverProfile/GuildProfileModal.tsx
@@ -236,6 +236,7 @@ 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 ce6a7058..e151df20 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 => {line});
+ lines = content.split("\n").map((line, i) => {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 => {
+ lines = renderTokens.map((line, i) => {
// [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 dd140193..e14171e5 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, React } from "@webpack/common";
+import { hljs } 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 948bdb83..e7963a76 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 26efce1d..ebd42580 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 a1ee8de8..6d2b9c3b 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 dae7ad4c..134cfa67 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, React, Tooltip } from "@webpack/common";
+import { Button, ButtonLooks, ButtonWrapperClasses, FluxDispatcher, 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 43c499ab..64ee52fc 100644
--- a/src/plugins/spotifyControls/PlayerComponent.tsx
+++ b/src/plugins/spotifyControls/PlayerComponent.tsx
@@ -38,19 +38,21 @@ function msToHuman(ms: number) {
}
function Svg(path: string, label: string) {
- return () => (
-
- );
+ return function Icon() {
+ return (
+
+ );
+ };
}
// KraXen's icons :yesyes:
diff --git a/src/plugins/startupTimings/StartupTimingPage.tsx b/src/plugins/startupTimings/StartupTimingPage.tsx
index c8cf51da..0950b068 100644
--- a/src/plugins/startupTimings/StartupTimingPage.tsx
+++ b/src/plugins/startupTimings/StartupTimingPage.tsx
@@ -120,8 +120,8 @@ function ServerTrace({ trace }: ServerTraceProps) {
- {lines.map(line => (
- {line}
+ {lines.map((line, i) => (
+ {line}
))}
diff --git a/src/plugins/typingTweaks/index.tsx b/src/plugins/typingTweaks/index.tsx
index 62bcd41f..ccb863ce 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, React, RelationshipStore } from "@webpack/common";
+import { Avatar, GuildMemberStore, 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 0181c95b..43a4d121 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 (props: T) => {
+ return function Lazy(props: T) {
const Component = get() ?? NoopComponent;
return ;
};