Skip to content

Commit c8f68c8

Browse files
authored
Merge pull request #15 from oslabs-beta/kelsi/routing
Kelsi/routing
2 parents 754271f + 0ae98f8 commit c8f68c8

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

app/components/Header.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useContext, useState } from 'react';
2-
import { useNavigate} from 'react-router-dom';
2+
import { useNavigate } from 'react-router-dom';
33
import { ApplicationContext } from '../context/ApplicationContext';
44
import { DashboardContext } from '../context/DashboardContext';
55
import '../stylesheets/Header.scss';
@@ -37,7 +37,7 @@ const Header: React.FC<HeaderProps> = React.memo(({ app, service, setLive, live
3737
left: 0,
3838
behavior: 'smooth',
3939
});
40-
40+
4141
/** From Version 5.2 Team:
4242
* Can't remove ! in Lines 45 and 49 as they are strictNullChecks
4343
*/
@@ -53,7 +53,7 @@ const Header: React.FC<HeaderProps> = React.memo(({ app, service, setLive, live
5353

5454
const handleServices = () => {
5555
const joinedServices = selectedServices.join(' ');
56-
navigate(joinedServices);
56+
navigate(`/applications/${app}/${joinedServices}`);
5757
setLive(false);
5858
};
5959

@@ -65,7 +65,9 @@ const Header: React.FC<HeaderProps> = React.memo(({ app, service, setLive, live
6565
<h1 className="microserviceTitle">{app}</h1>
6666

6767
{selectModal && <div className="filter" onClick={dropdownClickHandler}></div>}
68-
<div><span>select services to display</span></div>
68+
<div>
69+
<span>select services to display</span>
70+
</div>
6971
<div className={selectModal ? 'dropdown active' : 'dropdown'}>
7072
<div
7173
className={selectModal ? 'select disabled' : 'select'}
@@ -85,7 +87,8 @@ const Header: React.FC<HeaderProps> = React.memo(({ app, service, setLive, live
8587
value={`${microservice}`}
8688
id={`${microservice}`}
8789
name={`${microservice}`}
88-
onChange={handleCheckbox} />
90+
onChange={handleCheckbox}
91+
/>
8992
</label>
9093
);
9194
})}

0 commit comments

Comments
 (0)