diff --git a/src/components/Feedback/FeedbackModal.tsx b/src/components/Feedback/FeedbackModal.tsx index e01fac42b..82b142c96 100644 --- a/src/components/Feedback/FeedbackModal.tsx +++ b/src/components/Feedback/FeedbackModal.tsx @@ -22,8 +22,10 @@ import FeedbackSuccess from './FeedbackSuccess'; import messages from '../../locales/Messages'; import FeedbackError from './FeedbackError'; -import './Feedback.scss'; import InternalChromeContext from '../../utils/internalChromeContext'; +import LibtJWTContext from '../LibJWTContext'; +import { createSupportCase } from '../../utils/createCase'; +import './Feedback.scss'; export type FeedbackModalProps = { user: DeepRequired; @@ -46,6 +48,7 @@ const FeedbackModal = memo(({ user }: FeedbackModalProps) => { const dispatch = useDispatch(); const [modalPage, setModalPage] = useState('feedbackHome'); const { getEnvironment } = useContext(InternalChromeContext); + const libjwt = useContext(LibtJWTContext); const env = getEnvironment(); const isAvailable = env === 'prod' || env === 'stage'; const setIsModalOpen = (isOpen: boolean) => dispatch(toggleFeedbackModal(isOpen)); @@ -73,13 +76,7 @@ const FeedbackModal = memo(({ user }: FeedbackModalProps) => { {intl.formatMessage(messages.describeBugUrgentCases)}
- { - window.open('https://access.redhat.com/support/cases/#/case/new/open-case?caseCreate=true', '_blank'); - }} - > + createSupportCase(user.identity, libjwt)}> {intl.formatMessage(messages.openSupportCase)}