File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,27 +5,23 @@ import { isEmpty } from 'lodash'
55import Sectors from './badges/Sectors'
66import SimulationRounds from './badges/SimulationRounds'
77
8- const useTitle = ( title ) => {
8+ const Title = ( ) => {
9+ const config = useSelector ( ( store ) => store . config )
10+
911 useEffect ( ( ) => {
1012 const prevTitle = document . title
13+ const title = isEmpty ( config . sectors ) ? (
14+ `${ config . simulation_round } protocol`
15+ ) : (
16+ `${ config . simulation_round } protocol for ${ config . sectors . join ( ', ' ) } `
17+ )
18+
1119 document . title = title
1220
1321 return ( ) => {
1422 document . title = prevTitle
1523 }
1624 } )
17- }
18-
19- const Title = ( ) => {
20- const config = useSelector ( ( store ) => store . config )
21-
22- useTitle (
23- isEmpty ( config . sectors ) ? (
24- `${ config . simulation_round } protocol`
25- ) : (
26- `${ config . simulation_round } protocol for ${ config . sectors . join ( ', ' ) } `
27- )
28- )
2925
3026 return (
3127 < div className = "title" >
You can’t perform that action at this time.
0 commit comments