mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
fix(account drawer): acconut drawer.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { useAccount, useAccountTransactions } from 'hooks/query';
|
||||
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
||||
import { DrawerHeaderContent, DashboardInsider } from 'components';
|
||||
|
||||
const AccountDrawerContext = React.createContext();
|
||||
|
||||
@@ -20,6 +20,7 @@ function AccountDrawerProvider({ accountId, ...props }) {
|
||||
} = useAccountTransactions(accountId, {
|
||||
enabled: !!accountId,
|
||||
});
|
||||
const name = `${account.name} ${account.code}`;
|
||||
|
||||
// provider.
|
||||
const provider = {
|
||||
@@ -30,6 +31,7 @@ function AccountDrawerProvider({ accountId, ...props }) {
|
||||
|
||||
return (
|
||||
<DashboardInsider loading={isAccountLoading || isAccountsLoading}>
|
||||
<DrawerHeaderContent name={'account-drawer'} title={name} />
|
||||
<AccountDrawerContext.Provider value={provider} {...props} />
|
||||
</DashboardInsider>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user