forked from userplugins/in-role
Added error boundary
This commit is contained in:
parent
7f7cf02d45
commit
1cd541fd67
1 changed files with 50 additions and 47 deletions
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { InfoIcon } from "@components/Icons";
|
||||
import { ModalCloseButton, ModalContent, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
|
||||
import { findByCodeLazy, findExportedComponentLazy } from "@webpack";
|
||||
|
@ -144,6 +145,7 @@ function InRoleModal({ guildId, props, roleId }: { guildId: string; props: Modal
|
|||
const [selectedRole, selectRole] = useState(roles.find(x => x.id === roleId) || roles[0]);
|
||||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<ModalRoot {...props} size={ModalSize.LARGE}>
|
||||
<ModalHeader>
|
||||
<Text className={cl("modal-title")} variant="heading-lg/semibold">View members with role</Text>
|
||||
|
@ -198,6 +200,7 @@ function InRoleModal({ guildId, props, roleId }: { guildId: string; props: Modal
|
|||
</div>
|
||||
</ModalContent>
|
||||
</ModalRoot >
|
||||
</ErrorBoundary>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue