From d2845d75ade0c48c57dc3b579a589653679135c9 Mon Sep 17 00:00:00 2001 From: Tong Li Date: Mon, 9 Dec 2024 11:49:57 +1100 Subject: [PATCH] feedback modal rebranding (#470) --- src/app/components/Modals/CongratModal.tsx | 65 ------ src/app/components/Modals/FeedbackModal.tsx | 224 +++++++++----------- 2 files changed, 102 insertions(+), 187 deletions(-) delete mode 100644 src/app/components/Modals/CongratModal.tsx diff --git a/src/app/components/Modals/CongratModal.tsx b/src/app/components/Modals/CongratModal.tsx deleted file mode 100644 index c9c654fd..00000000 --- a/src/app/components/Modals/CongratModal.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import { - Button, - Dialog, - DialogBody, - DialogFooter, - Heading, - MobileDialog, -} from "@babylonlabs-io/bbn-core-ui"; -import { LuPartyPopper } from "react-icons/lu"; - -import { useIsMobileView } from "@/app/hooks/useBreakpoint"; - -interface CongratModalProps { - open: boolean; - onClose: () => void; -} - -export function CongratModal({ open, onClose }: CongratModalProps) { - const isMobileView = useIsMobileView(); - const DialogComponent = isMobileView ? MobileDialog : Dialog; - - return ( - - -
-
- -
- Conratulations -

- Share feedback or report issues on our{" "} - - Forums - {" "} - or{" "} - - Discord - {" "} - (#feedback and #support) – thank you for being part of the Babylon - community! -

-
-
- - - -
- ); -} diff --git a/src/app/components/Modals/FeedbackModal.tsx b/src/app/components/Modals/FeedbackModal.tsx index 24f9fc8f..d3469d7e 100644 --- a/src/app/components/Modals/FeedbackModal.tsx +++ b/src/app/components/Modals/FeedbackModal.tsx @@ -1,8 +1,15 @@ -import { IoMdClose } from "react-icons/io"; +import { + Button, + Dialog, + DialogBody, + DialogFooter, + Heading, + MobileDialog, +} from "@babylonlabs-io/bbn-core-ui"; +import { LuPartyPopper } from "react-icons/lu"; +import { MdFeedback } from "react-icons/md"; -import { getNetworkConfig } from "@/config/network.config"; - -import { GeneralModal } from "./GeneralModal"; +import { useIsMobileView } from "@/app/hooks/useBreakpoint"; interface FeedbackModalProps { open: boolean; @@ -10,119 +17,91 @@ interface FeedbackModalProps { type: "success" | "cancel" | null; } -interface ContentProps { - networkName?: string; -} +interface ContentProps {} -const SuccessContent: React.FC = ({ networkName }) => { +const SuccessContent: React.FC = () => { return ( -
-
-

- You have successfully completed your Bitcoin staking journey on our{" "} - {networkName}. Your contribution helps secure the decentralized - economy. -

- -

Thank you for being a part of the Babylon community!

+
+
+
+ Conratulations +

+ Share feedback or report issues on our{" "} + + Forums + {" "} + or{" "} + + Discord + {" "} + (#feedback and #support) – thank you for being part of the Babylon + community! +

); }; const CancelContent: React.FC = () => { return ( -
-
-

- It looks like you didn’t complete your staking journey. We'd love - to help you get back on track or hear about any issues you faced. -

- -

- Your feedback is crucial for us to improve and provide a seamless - experience. Thank you for being a part of our Bitcoin Staking - Protocol! -

+
+
+
+ We Value Your Feedback +

+ It looks like you didn’t complete your staking journey. We'd love + to help you get back on track or hear about any issues you faced. +

+ +

+ Your feedback is crucial for us to improve and provide a seamless + experience. Thank you for being a part of our Bitcoin Staking Protocol! +

); }; @@ -132,23 +111,24 @@ export const FeedbackModal: React.FC = ({ onClose, type, }) => { - const { networkName } = getNetworkConfig(); + const isMobileView = useIsMobileView(); + const DialogComponent = isMobileView ? MobileDialog : Dialog; return ( - -
-

- {type === "success" ? "Congratulations!" : "We Value Your Feedback"} -

- -
- {type === "success" && } - {type === "cancel" && } -
+ Done + + + ); };