File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import IssueHeader from './IssueHeader';
2020
2121export default function IssueDashboard ( ) {
2222 const dispatch = useDispatch ( ) ;
23- const issues = useSelector ( state => state . bmIssues . issues || [ ] ) ;
23+ const issues = useSelector ( state => state . bmIssues || [ ] ) ;
2424 const darkMode = useSelector ( state => state . theme . darkMode ) ;
2525
2626 const [ currentPage , setCurrentPage ] = useState ( 1 ) ;
Original file line number Diff line number Diff line change 11import { useParams } from 'react-router-dom' ;
2- import { useSelector } from 'react-redux' ;
2+ import { useSelector , useDispatch } from 'react-redux' ;
3+ import { useEffect } from 'react' ;
34import { Container , Row , Col } from 'reactstrap' ;
45import LogBar from './LogBar' ;
56import RentedToolsDisplay from './RentedTools/RentedToolsDisplay' ;
67import MaterialsDisplay from './Materials/MaterialsDisplay' ;
78import ProjectLog from './ProjectLog' ;
89import './ProjectDetails.css' ;
10+ import { fetchBMProjects } from '../../../../actions/bmdashboard/projectActions' ;
911
1012function ProjectDetails ( ) {
13+ const dispatch = useDispatch ( ) ;
14+ useEffect ( ( ) => {
15+ dispatch ( fetchBMProjects ( ) ) ;
16+ } , [ ] ) ;
1117 const { projectId } = useParams ( ) ;
1218 const darkMode = useSelector ( state => state . theme . darkMode ) ;
1319 const projects = useSelector ( state => state . bmProjects ) || [ ] ;
Original file line number Diff line number Diff line change @@ -472,7 +472,7 @@ export function Header(props) {
472472 < DropdownItem tag = { Link } to = "/bmdashboard/equipment" className = { fontColor } >
473473 Equipment/Tool List
474474 </ DropdownItem >
475- < DropdownItem tag = { Link } to = "/bmdashboard/Issue " className = { fontColor } >
475+ < DropdownItem tag = { Link } to = "/bmdashboard/issues " className = { fontColor } >
476476 Issue
477477 </ DropdownItem >
478478 < DropdownItem tag = { Link } to = "/bmdashboard/lessonform/" className = { fontColor } >
You can’t perform that action at this time.
0 commit comments