Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/src/Controllers/TransactionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public function index(Request $request, Response $response): Response
$transactionRepo = $this->em->getRepository(Transaction::class);

$transactions = $transactionRepo->createQueryBuilder('t')
->leftJoin('t.category', 'c')
->addSelect('c')
->setFirstResult($skip)
->setMaxResults($limit)
->getQuery()
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React, { useState } from 'react';
import React, { useState, useCallback } from 'react';
import './App.css';
import Header from './components/Header';
import TransactionList from './components/TransactionList';

function App() {
const [userActivityCount, setUserActivityCount] = useState(0);

const handleUserProfileClick = () => {
const handleUserProfileClick = useCallback(() => {
console.log("User profile clicked!");
setUserActivityCount(prev => prev + 1);
};
}, []);

return (
<div className="App min-h-screen bg-gray-100 flex flex-col">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/TransactionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ const TransactionList: React.FC = () => {
);
};

export default TransactionList;
export default React.memo(TransactionList);