From c99cb99b3b3ae2cc3f2bd6fd13a5b416eb6278c8 Mon Sep 17 00:00:00 2001 From: Davide Bizzi Date: Mon, 5 Feb 2024 15:42:39 +0100 Subject: [PATCH 1/2] feat: Fix feedback modal email --- src/pages/Dashboard/FeedbackModal.tsx | 7 +++++-- src/pages/Dashboard/index.tsx | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/Dashboard/FeedbackModal.tsx b/src/pages/Dashboard/FeedbackModal.tsx index c3ad6e1de..594ac55cf 100644 --- a/src/pages/Dashboard/FeedbackModal.tsx +++ b/src/pages/Dashboard/FeedbackModal.tsx @@ -1,17 +1,17 @@ import { Button, Modal, ModalBody } from "@appquality/appquality-design-system"; import { ChatLeftDots } from "react-bootstrap-icons"; import { useTranslation } from "react-i18next"; +import { useGetUsersMeQuery } from "src/services/tryberApi"; import styled from "styled-components"; export const FeedbackModal = ({ open = true, onClose, - user, }: { open?: boolean; onClose: () => void; - user?: UserData; }) => { + const { data: user, isLoading } = useGetUsersMeQuery({ fields: "id,email" }); const { t } = useTranslation(); const iFrameStyle = { @@ -20,10 +20,13 @@ export const FeedbackModal = ({ minHeight: "400px", border: "none", }; + + if (isLoading) return null; return (