feat: dashboard back link in expand mode.

This commit is contained in:
Ahmed Bouhuolia
2020-11-30 10:59:10 +02:00
parent 0acc998283
commit fe55c84941
19 changed files with 131 additions and 25 deletions

View File

@@ -32,7 +32,8 @@ function MakeJournalEntriesPage({
// #withDashboardActions
setSidebarShrink,
resetSidebarPreviousExpand
resetSidebarPreviousExpand,
setDashboardBackLink
}) {
const history = useHistory();
const { id } = useParams();
@@ -40,10 +41,14 @@ function MakeJournalEntriesPage({
useEffect(() => {
// Shrink the sidebar by foce.
setSidebarShrink();
// Show the back link on dashboard topbar.
setDashboardBackLink('/manual-journals');
return () => {
// Reset the sidebar to the previous status.
resetSidebarPreviousExpand();
// Hide the back link on dashboard topbar.
setDashboardBackLink(false);
};
}, [resetSidebarPreviousExpand, setSidebarShrink]);