Skip to content

Commit

Permalink
feat(ui-shell): Made the PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gheorghe Pandia committed Jan 28, 2022
1 parent 2dee7c7 commit f0f603b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/components/Feedback/Feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ const { prefix } = settings;

class Feedback extends Component {

handleCloseModal = (closeModal) => {
closeModal();
};

render() {
return (
<HeaderMenuItem
Expand All @@ -31,7 +27,7 @@ class Feedback extends Component {
<>
<ModalHeader
title="Submit an Idea"
closeModal={() => this.handleCloseModal(closeModal)}
closeModal={closeModal}
/>
<ModalBody>
<div className={`${prefix}--bmrg-feedback`}>
Expand All @@ -58,7 +54,7 @@ class Feedback extends Component {
</div>
</ModalBody>
<ModalFooter>
<Button kind="secondary" onClick={() => this.handleCloseModal(closeModal)}>
<Button kind="secondary" onClick={closeModal}>
OK
</Button>
</ModalFooter>
Expand Down
9 changes: 8 additions & 1 deletion src/components/UIShell/UIShell.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ UIShell.propTypes = {
*/
companyName: PropTypes.string,

/**
* used to redirect the users to a submit idea portal under feedback
*/
sendIdeasUrl: PropTypes.string,

/**
* Pass in whole header config object used for
* - Feature flagging
Expand Down Expand Up @@ -158,6 +163,7 @@ UIShell.defaultProps = {
renderPrivacyStatement: true,
user: {},
renderRightPanel: {},
sendIdeasUrl: "https://ideas.ibm.com",
};

function UIShell({
Expand All @@ -179,6 +185,7 @@ function UIShell({
renderSidenav,
skipToContentProps,
user,
sendIdeasUrl,
}) {
const finalPlatformName = platformName || companyName;
const finalAppName = appName || productName;
Expand Down Expand Up @@ -260,7 +267,7 @@ function UIShell({
/>
),
isFeedbackEnabled && (
<Feedback platformName={platformName} sendIdeasUrl="https://ideas.ibm.com" key="Feedback" />
<Feedback platformName={platformName} sendIdeasUrl={sendIdeasUrl} key="Feedback" />
),
].filter(Boolean)}
profileChildren={[
Expand Down

0 comments on commit f0f603b

Please sign in to comment.