diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-13 13:00:00 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-17 17:06:49 +0200 |
| commit | 24147cba0f5723be3525e8f40d1954144841629b (patch) | |
| tree | d44727504f7a9c579219616cbdba5e965543561a /opendc-web/opendc-web-ui/src/containers/navigation/AppNavbarContainer.js | |
| parent | 4397a959e806bf476be4c81bc804616adf58b969 (diff) | |
ui: Address technical dept in frontend
Diffstat (limited to 'opendc-web/opendc-web-ui/src/containers/navigation/AppNavbarContainer.js')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/containers/navigation/AppNavbarContainer.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/opendc-web/opendc-web-ui/src/containers/navigation/AppNavbarContainer.js b/opendc-web/opendc-web-ui/src/containers/navigation/AppNavbarContainer.js index 42a44345..d0d28ccb 100644 --- a/opendc-web/opendc-web-ui/src/containers/navigation/AppNavbarContainer.js +++ b/opendc-web/opendc-web-ui/src/containers/navigation/AppNavbarContainer.js @@ -1,11 +1,9 @@ import React from 'react' -import { useSelector } from 'react-redux' import AppNavbarComponent from '../../components/navigation/AppNavbarComponent' +import { useProject } from '../../store/hooks/project' const AppNavbarContainer = (props) => { - const project = useSelector((state) => - state.currentProjectId !== '-1' ? state.objects.project[state.currentProjectId] : undefined - ) + const project = useProject() return <AppNavbarComponent {...props} project={project} /> } |
