Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #644

Merged
merged 4 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ export function Header(props) {
isAuthenticated={isAuthenticated}
menuList={menuProps.menuList}
onSignOut={menuProps.onSignOut}
/>
hasCustomLink={menuProps.hasCustomLink}
>
{props.children}
</Menu>
)}
{breadCrumbItems && (
<div className={containerClass}>
Expand Down Expand Up @@ -117,6 +120,7 @@ Header.defaultProps = {
{ key: "outKey", value: "Sign out", path: "/" },
],
hasNoMenu: false,
hasCustomLink: false,
},
topnavProps: {
skipToMainPath: "#wb-cont",
Expand Down Expand Up @@ -189,6 +193,7 @@ Header.propTypes = {
),
hasNoMenu: PropTypes.bool,
useParentContainer: PropTypes.bool,
hasCustomLink: PropTypes.bool,
}),

/**
Expand Down
6 changes: 3 additions & 3 deletions src/components/Menu/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import FR from "../../translations/fr.json";
* Menu component
*/
export function Menu(props) {
const { onClick, isAuthenticated, menuList, lang, customLink } = props;
const { onClick, isAuthenticated, menuList, lang, hasCustomLink } = props;
const [showDropdown, setShowDropdown] = useState(false);
const dropdown = useRef(null);

Expand Down Expand Up @@ -89,7 +89,7 @@ export function Menu(props) {
aria-labelledby="dropdownLargeButton"
ref={dropdown}
>
{customLink
{hasCustomLink
? props.children
: menuList.map((element, index) => {
return (
Expand Down Expand Up @@ -172,7 +172,7 @@ Menu.propTypes = {
/**
* Allow user to pass in their own Link component when set true
*/
customLink: PropTypes.bool,
hasCustomLink: PropTypes.bool,

/**
* List of menu items to display in dropdown with links
Expand Down