Skip to content

Commit

Permalink
changed title
Browse files Browse the repository at this point in the history
  • Loading branch information
lsylcy0307 committed Apr 28, 2024
1 parent 0b4745e commit 99dbb42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions client/src/Popup/PopupPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import {
TableBody,
TableRow,
TableCell,
Typography,
} from '@mui/material';
import IDonor from '../util/types/donor';
import { useData } from '../util/api';
import { useData } from '../util/api';

interface BasicDonationStat {
amount: number;
Expand Down Expand Up @@ -42,7 +43,7 @@ function PopupPage() {

const donorID = '662e7657350953c9287c543c';
const donations = useData(`donation/donor/${donorID}`);
const donor = useData(`donor/${donorID}`);
const donor = useData(`donor/id/${donorID}`);
const [donorData, setDonatorData] = useState<IDonor | null>(null);
const [donationsData, setDonationsData] = useState<any>([]);
const [donationsStats, setDonationsStats] = useState<DonationStats>();
Expand Down Expand Up @@ -207,7 +208,7 @@ function PopupPage() {

{/* Popup */}
<Dialog open={openPopup} onClose={handleClosePopup}>
<DialogTitle>{donorData?.contact_name} Summary</DialogTitle>
<DialogTitle> {donorData?.contact_name} Summary </DialogTitle>
<DialogContent>
<TableContainer component={Paper}>
<Table>
Expand Down
4 changes: 2 additions & 2 deletions server/src/routes/donor.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const router = express.Router();

router.get('/all', getAllDonorsController);

router.get('/:type', isAuthenticated, getAllDonorsOfType);
router.get('type/:type', isAuthenticated, getAllDonorsOfType);

router.get('/:id', isAuthenticated, getDonorByIdController);
router.get('/id/:id', isAuthenticated, getDonorByIdController);

// router.post('/create', isAuthenticated, createDonorController);
// For testing:
Expand Down

0 comments on commit 99dbb42

Please sign in to comment.