ErrorBoundary some more components

This commit is contained in:
Nuckyz 2024-05-09 03:14:20 -03:00
parent 14e68d9a24
commit 1a3a378fb1
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
6 changed files with 29 additions and 20 deletions

View file

@ -19,6 +19,7 @@
import "./style.css";
import { addServerListElement, removeServerListElement, ServerListRenderPosition } from "@api/ServerList";
import ErrorBoundary from "@components/ErrorBoundary";
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
import { Button, FluxDispatcher, GuildChannelStore, GuildStore, React, ReadStateStore } from "@webpack/common";
@ -64,7 +65,7 @@ export default definePlugin({
authors: [Devs.kemo],
dependencies: ["ServerListAPI"],
renderReadAllButton: () => <ReadAllButton />,
renderReadAllButton: ErrorBoundary.wrap(ReadAllButton, { noop: true }),
start() {
addServerListElement(ServerListRenderPosition.Above, this.renderReadAllButton);