Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
chore: use isLoading
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Jun 27, 2024
1 parent a9bf2bd commit dbbf636
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frontend/src/components/TransactionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import Loading from "src/components/Loading";
import { useTransactions } from "src/hooks/useTransactions";

function TransactionsList() {
const { data: transactions } = useTransactions();
const { data: transactions, isLoading } = useTransactions();

if (!transactions) {
if (isLoading) {
return <Loading />;
}

console.info(transactions);

return (
<div>
{!transactions?.length ? (
Expand Down

0 comments on commit dbbf636

Please sign in to comment.