diff --git a/src/Header/Account/Account.jsx b/src/Header/Account/Account.jsx index ed9f156c..93b98bd0 100644 --- a/src/Header/Account/Account.jsx +++ b/src/Header/Account/Account.jsx @@ -64,9 +64,9 @@ export default class Account extends Component { if (href.indexOf("editprofile") > -1) { eventLabel = "Edit profile"; - } else if (href.indexOf("signout") > -1) { + } else if (href.indexOf("signout") > -1 || href.indexOf("logout") > -1) { eventLabel = "Sign out"; - } else if (href.indexOf("signin") > -1) { + } else if (href.indexOf("signin") > -1 || href.indexOf("login") > -1) { eventLabel = "Sign in"; } diff --git a/src/Header/Header.jsx b/src/Header/Header.jsx index 0ffea1eb..eb7acd26 100644 --- a/src/Header/Header.jsx +++ b/src/Header/Header.jsx @@ -146,7 +146,7 @@ Header.propTypes = { enabled: PropTypes.bool, search: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), cookie: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), - auth: PropTypes.object, + auth: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), onNavigating: PropTypes.oneOfType([PropTypes.func, PropTypes.string]) }; diff --git a/src/Header/Nav/Nav.jsx b/src/Header/Nav/Nav.jsx index f2738143..30217898 100644 --- a/src/Header/Nav/Nav.jsx +++ b/src/Header/Nav/Nav.jsx @@ -44,9 +44,9 @@ export default class Nav extends Component { let eventLabel; if (href.indexOf("editprofile") > -1) { eventLabel = "Edit profile"; - } else if (href.indexOf("signout") > -1) { + } else if (href.indexOf("signout") > -1 || href.indexOf("logout") > -1) { eventLabel = "Sign out"; - } else if (href.indexOf("signin") > -1) { + } else if (href.indexOf("signin") > -1 || href.indexOf("login") > -1) { eventLabel = "Sign in"; } diff --git a/src/Header/Search/Autocomplete/Autocomplete.test.jsx b/src/Header/Search/Autocomplete/Autocomplete.test.jsx index 66e1dbb4..c3a94c58 100644 --- a/src/Header/Search/Autocomplete/Autocomplete.test.jsx +++ b/src/Header/Search/Autocomplete/Autocomplete.test.jsx @@ -112,7 +112,6 @@ describe("Autocomplete", () => { it("should not load suggestions within the reate limit threshold", () => { jest.useFakeTimers(); - const callback = () => {}; const wrapper = shallow( ); diff --git a/types.d.ts b/types.d.ts index a9256237..ef6453dc 100644 --- a/types.d.ts +++ b/types.d.ts @@ -51,7 +51,7 @@ declare module "@nice-digital/global-nav" { skipLinkId?: string; search?: false | SearchProps; cookie?: boolean; - auth?: NiceAccountsProviderProps | IdamProviderProps; + auth?: false | NiceAccountsProviderProps | IdamProviderProps; onNavigating?: string | OnNavigatingCallback; };