Skip to content
Closed
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
21 changes: 4 additions & 17 deletions src/header/HeaderAuthentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
import { Link } from '@carbon/icons-react';
import PropTypes from 'prop-types';
import usePlatformData from '../hooks/usePlatformData';

Expand All @@ -46,22 +45,10 @@ const HeaderAuthentication = ({ className }) => {
}`}>
<span>
{authenticationAlias ? (
<>
{authenticationService} &nbsp;
<Link
/* eslint-disable-next-line max-len */
className='HeaderAuthentication__authentication__linkIcon'
id='link-icon'
/>
&nbsp;
<a
href={authenticationLink}
target='_blank'
rel='noreferrer'
title={authenticationAlias}>
{authenticationAlias}
</a>
</>
<a href={authenticationLink}>
{authenticationService}:{' '}
<u>{authenticationAlias}</u>
</a>
) : (
authenticationService
)}
Expand Down
3 changes: 1 addition & 2 deletions src/header/HeaderAuthentication.less
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@
a {
text-decoration: none;
color: var(--tag-color-teal);

padding-left: @sp-02;
max-width: @sp-160;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: @blue-40;
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/header/HeaderLogo.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ import usePlatformData from '../hooks/usePlatformData';
const HeaderLogo = ({ className }) => {
const { data } = usePlatformData();
const headerLogoPath = data?.platform?.header_logo_path;
const gatewayVersion = data?.user?.authentication_info?.gateway_version;

return (
<a
className={`HeaderLogo__logo${className ? ' ' + className : ''}`}
href='/'>
<img src={headerLogoPath} alt='Gateway logo' />
<span className='HeaderLogo__logo__name'>Gateway</span>
<span className='HeaderLogo__logo__name'>
Gateway {gatewayVersion}
</span>
</a>
);
};
Expand Down
1 change: 1 addition & 0 deletions stories/Header.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const platformMockValue = {
alias: 'BAM-9.5.0',
url: '#',
service: 'BAM',
gateway_version: '25.2.1',
},
help_links: {
custom: [
Expand Down
Loading