mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
BC-5 fix: general tab of preferences form submitting.
This commit is contained in:
@@ -2,14 +2,25 @@ import React, { useEffect } from 'react';
|
||||
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
||||
|
||||
import HomepageContent from './HomepageContent';
|
||||
|
||||
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
import withCurrentOrganization from '../Organization/withCurrentOrganization';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
function DashboardHomepage({ changePageTitle, name }) {
|
||||
/**
|
||||
* Dashboard homepage.
|
||||
*/
|
||||
function DashboardHomepage({
|
||||
// #withDashboardActions
|
||||
changePageTitle,
|
||||
|
||||
// #withCurrentOrganization
|
||||
organization,
|
||||
}) {
|
||||
useEffect(() => {
|
||||
changePageTitle(name);
|
||||
}, [name, changePageTitle]);
|
||||
changePageTitle(organization.name);
|
||||
}, [organization.name, changePageTitle]);
|
||||
|
||||
return (
|
||||
<DashboardInsider name="homepage">
|
||||
@@ -20,7 +31,5 @@ function DashboardHomepage({ changePageTitle, name }) {
|
||||
|
||||
export default compose(
|
||||
withDashboardActions,
|
||||
withSettings(({ organizationSettings }) => ({
|
||||
name: organizationSettings.name,
|
||||
})),
|
||||
withCurrentOrganization(({ organization }) => ({ organization })),
|
||||
)(DashboardHomepage);
|
||||
|
||||
Reference in New Issue
Block a user