diff --git a/src/plugins/decor/ui/modals/CreateDecorationModal.tsx b/src/plugins/decor/ui/modals/CreateDecorationModal.tsx
index a5937b0d..eea79d86 100644
--- a/src/plugins/decor/ui/modals/CreateDecorationModal.tsx
+++ b/src/plugins/decor/ui/modals/CreateDecorationModal.tsx
@@ -4,10 +4,11 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
+import ErrorBoundary from "@components/ErrorBoundary";
import { Link } from "@components/Link";
import { openInviteModal } from "@utils/discord";
import { Margins } from "@utils/margins";
-import { closeAllModals, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal";
+import { closeAllModals, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
import { Button, FluxDispatcher, Forms, GuildStore, NavigationRouter, Text, TextInput, useEffect, useMemo, UserStore, useState } from "@webpack/common";
@@ -21,6 +22,8 @@ const DecorationModalStyles = findByPropsLazy("modalFooterShopButton");
const FileUpload = findComponentByCodeLazy("fileUploadInput,");
+const { default: HelpMessage, HelpMessageTypes } = findByPropsLazy("HelpMessageTypes");
+
function useObjectURL(object: Blob | MediaSource | null) {
const [url, setUrl] = useState
(null);
@@ -39,7 +42,7 @@ function useObjectURL(object: Blob | MediaSource | null) {
return url;
}
-export default function CreateDecorationModal(props) {
+function CreateDecorationModal(props: ModalProps) {
const [name, setName] = useState("");
const [file, setFile] = useState(null);
const [submitting, setSubmitting] = useState(false);
@@ -75,65 +78,69 @@ export default function CreateDecorationModal(props) {
className={cl("create-decoration-modal-content")}
scrollbarType="none"
>
-
-
- {error !== null &&
{error.message}}
-
-
+
+ Make sure your decoration does not violate
+ the guidelines
+ before submitting it.
+
+
+
+ {error !== null && {error.message}}
+
+
+
+ File should be APNG or PNG.
+
+
+
+
+
+ This name will be used when referring to this decoration.
+
+
+
+
+
-
- File should be APNG or PNG.
-
-
-
-
-
- This name will be used when referring to this decoration.
-
-
+
-
-
-
- Make sure your decoration does not violate
- the guidelines
- before creating your decoration.
-
You can receive updates on your decoration's review by joining {
- e.preventDefault();
- if (!GuildStore.getGuild(GUILD_ID)) {
- const inviteAccepted = await openInviteModal(INVITE_KEY);
- if (inviteAccepted) {
+
+
You can receive updates on your decoration's review by joining {
+ e.preventDefault();
+ if (!GuildStore.getGuild(GUILD_ID)) {
+ const inviteAccepted = await openInviteModal(INVITE_KEY);
+ if (inviteAccepted) {
+ closeAllModals();
+ FluxDispatcher.dispatch({ type: "LAYER_POP_ALL" });
+ }
+ } else {
closeAllModals();
FluxDispatcher.dispatch({ type: "LAYER_POP_ALL" });
+ NavigationRouter.transitionToGuild(GUILD_ID);
}
- } else {
- closeAllModals();
- FluxDispatcher.dispatch({ type: "LAYER_POP_ALL" });
- NavigationRouter.transitionToGuild(GUILD_ID);
- }
- }}
- >
- Decor's Discord server
- .
-
+ }}
+ >
+ Decor's Discord server
+ .
+
+