import { useQuery } from "@tanstack/react-query"; import { TransactionsByStudentAPI } from "../../API/API"; import styles from "../../../styles"; import CircularProgress from "@mui/material/CircularProgress/CircularProgress"; import React, { useState } from "react"; import TransactionEntry from "../../TransactionEntry/TransactionEntry"; import TransactionFilterMenu from "../../TransactionFilterMenu/TransactionFilterMenu"; import { useNavigate } from "react-router-dom"; export default function StudentTransactionListView() { const navigate = useNavigate(); const transactions = useQuery({ queryKey: ["transactions_student"], queryFn: TransactionsByStudentAPI, }); const [filter, setFilter] = useState(""); if (transactions.isLoading) { return (
Loading