diff --git a/package-lock.json b/package-lock.json
index 58bbb33..de0a121 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "discovery_ui",
- "version": "2.1.42",
+ "version": "2.1.43",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 99ddc19..826b5f3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "discovery_ui",
- "version": "2.1.42",
+ "version": "2.1.43",
"description": "UI for dataset discovery",
"main": "./src/index.js",
"repository": {
@@ -22,6 +22,8 @@
"@fortawesome/free-brands-svg-icons": "^5.10.2",
"@fortawesome/react-fontawesome": "^0.1.4",
"@smartcitiesdata/react-discovery-ui": "2.1.39",
+ "@material-ui/core": "^4.12.4",
+ "@material-ui/icons": "^4.11.3",
"buffer": "^6.0.3",
"definitions": "0.0.2",
"immutable": "^3.8.2",
diff --git a/src/components/header/header.js b/src/components/header/header.js
index 2aa37b7..8f2b399 100644
--- a/src/components/header/header.js
+++ b/src/components/header/header.js
@@ -1,6 +1,7 @@
import './header.scss'
import React, { useState } from 'react'
import urbanosLogo from '../../assets/urbanos-logo.png'
+import HomeIcon from '@material-ui/icons/Home'
const Header = () => {
const [imageLoadError, setImageLoadError] = useState(false)
@@ -27,6 +28,11 @@ const Header = () => {
{`${window.HEADER_TITLE}`}
+
)
diff --git a/src/components/header/header.scss b/src/components/header/header.scss
index ff9684d..487227c 100644
--- a/src/components/header/header.scss
+++ b/src/components/header/header.scss
@@ -19,6 +19,7 @@ header {
display: flex;
flex-direction: row;
align-items: center;
+ width: 100%;
}
.title {
@@ -90,22 +91,22 @@ header {
}
- // .nav-element:hover {
- // background-color: black;
- // color: white;
- // border: black solid 5px;
- // }
-
.highlighted {
background-color: white;
color: black;
border: black solid 5px;
}
- // .highlighted:hover {
- // background-color: black;
- // color: white;
- // }
+ .home-icon-container {
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ padding-right: 10px;
+ }
+
+ .home-icon {
+ font-size: 2.5rem;
+ }
.pinned {
position: fixed;
@@ -158,10 +159,6 @@ header {
}
}
- .title {
- width: 90%;
- }
-
.top-bar {
padding: 20px 20px 20px 10px;
}
diff --git a/src/components/header/header.test.js b/src/components/header/header.test.js
index 8bd7714..25a7e94 100644
--- a/src/components/header/header.test.js
+++ b/src/components/header/header.test.js
@@ -19,6 +19,13 @@ describe('Header', () => {
expect(headerLogo).toHaveAttribute('alt', 'testHeaderTitle logo')
})
+ test('contains clickable home icon', () => {
+ render()
+
+ expect(screen.getByTestId('home-icon')).toBeInTheDocument
+ expect(screen.getAllByRole('link')[1].href).toContain("/testBaseUrl")
+ })
+
test('uses backup logo when initial image src fails', () => {
render()