Newer
Older
import { useLocation } from 'react-router-dom';
import { useReports } from 'loot-core/src/client/data-hooks/reports';
import { useAccounts } from '../../hooks/useAccounts';
Joel Jeremy Marquez
committed
import { useFeatureFlag } from '../../hooks/useFeatureFlag';
import { View } from '../common/View';
import { MOBILE_NAV_HEIGHT } from '../mobile/MobileNavTabs';
import { MobilePageHeader, Page, PageHeader } from '../Page';
import { CashFlowCard } from './reports/CashFlowCard';
import { CustomReportListCards } from './reports/CustomReportListCards';
import { NetWorthCard } from './reports/NetWorthCard';
import { SpendingCard } from './reports/SpendingCard';
const location = useLocation();
sessionStorage.setItem('url', location.pathname);
const spendingReportFeatureFlag = useFeatureFlag('spendingReport');
const accounts = useAccounts();
<Page
header={
isNarrowWidth ? (
<MobilePageHeader title="Reports" />
) : (
<View
style={{
flexDirection: 'row',
justifyContent: 'space-between',
marginRight: 15,
}}
>
<PageHeader title="Reports" />
<Link to="/reports/custom" style={{ textDecoration: 'none' }}>
<Button type="primary">
<Text>Create new custom report</Text>
</Button>
</Link>
)}
</View>
)
}
padding={0}
style={{ paddingBottom: MOBILE_NAV_HEIGHT }}
}}
>
<NetWorthCard accounts={accounts} />
<CashFlowCard />
</Page>