Add Expenses app
A UI based on [Budget Zen](https://github.com/BrunoBernardino/budgetzen-web) but slightly updated and adjusted for bewCloud. It also features a chart with available money and spent by budgets. This is useful for envelope-based budgeting.
This commit is contained in:
23
islands/expenses/ExpensesWrapper.tsx
Normal file
23
islands/expenses/ExpensesWrapper.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Budget, Expense, SupportedCurrencySymbol } from '/lib/types.ts';
|
||||
import MainExpenses from '/components/expenses/MainExpenses.tsx';
|
||||
|
||||
interface ExpensesWrapperProps {
|
||||
initialBudgets: Budget[];
|
||||
initialExpenses: Expense[];
|
||||
initialMonth: string;
|
||||
currency: SupportedCurrencySymbol;
|
||||
}
|
||||
|
||||
// This wrapper is necessary because islands need to be the first frontend component, but they don't support functions as props, so the more complex logic needs to live in the component itself
|
||||
export default function ExpensesWrapper(
|
||||
{ initialBudgets, initialExpenses, initialMonth, currency }: ExpensesWrapperProps,
|
||||
) {
|
||||
return (
|
||||
<MainExpenses
|
||||
initialBudgets={initialBudgets}
|
||||
initialExpenses={initialExpenses}
|
||||
initialMonth={initialMonth}
|
||||
currency={currency}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user