Skip to content

Commit

Permalink
Small styling tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mathewhany committed Nov 13, 2023
1 parent fdfbcf9 commit 5f8f554
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
9 changes: 7 additions & 2 deletions frontend/src/components/BaseLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
IconButton,
} from '@mui/material'
import React from 'react'
import { Link, Outlet } from 'react-router-dom'
import { Link, Outlet, useLocation } from 'react-router-dom'
import { OnlyAuthenticated } from './OnlyAuthenticated'
import { LocalizationProvider } from '@mui/x-date-pickers'
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'
Expand All @@ -28,10 +28,15 @@ interface ListItemLinkProps {

function ListItemLink(props: ListItemLinkProps) {
const { icon, primary, to } = props
const location = useLocation()

return (
<li>
<ListItemButton component={Link} to={to}>
<ListItemButton
component={Link}
to={to}
selected={location.pathname === to}
>
{icon ? <ListItemIcon>{icon}</ListItemIcon> : null}
<ListItemText primary={primary} />
</ListItemButton>
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/features/doctor-dashboard/routes/Patient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,20 @@ export function Patient() {
{`${prescription.medicine} - ${prescription.date.toString()}`}
</Typography>
))}

{patient.prescriptions.length == 0 && (
<Typography variant="body1">None</Typography>
)}
</Stack>
<Stack spacing={5}>
{/* <Stack spacing={5}>
<img
src={
'https://images.sampleforms.com/wp-content/uploads/2016/07/pediatric-medical-history-form.jpg'
}
className="Screenshot"
alt="showing screen capture"
/>
</Stack>
</Stack> */}
<Stack spacing={-1}>
<Typography variant="overline" color="text.secondary">
Medical Records
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/features/doctor-dashboard/routes/Wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function Wallet() {
<Card variant="outlined">
<CardContent>
<Typography variant="h6" color="text.secondary">
{`Wallet Money: ${res.money} EGP`}
{`Wallet Money: ${res.money.toFixed(2)} EGP`}
</Typography>
</CardContent>
</Card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function ViewMedicalHistory() {
component="h1"
gutterBottom
>
Health Records Files
Medical History Files
</Typography>

{MedicalHistory.map((url, index) => (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/features/patient-dashboard/routes/Wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function Wallet() {
<Card variant="outlined">
<CardContent>
<Typography variant="h6" color="text.secondary">
{`Wallet Money: ${res.money} EGP`}
{`Wallet Money: ${res.money.toFixed(2)} EGP`}
</Typography>
</CardContent>
</Card>
Expand Down

0 comments on commit 5f8f554

Please sign in to comment.