import { createResource } from 'solid-js';
import './App.css'
import { getAllBudgetUpdates, getAllCategories } from '../ajax/backend';
import { HistogramView } from './histogram/HistogramView';
import { BudgetUpdatesTableView } from './budgetUpdatesTable/BudgetUpdatesTableView';

function App() {
  const [categories] = createResource(getAllCategories);
  const [budgetUpdates] = createResource(getAllBudgetUpdates);

  return (
    <div>
      <HistogramView categories={categories} />
      <BudgetUpdatesTableView budgetUpdates={budgetUpdates} categories={categories} />
    </div>
  );
}

export default App
