Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added skeleton loading to the hospitals arond page issue #473 #537

Merged
merged 1 commit into from
Oct 25, 2024
Merged
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
64 changes: 32 additions & 32 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@fortawesome/free-brands-svg-icons": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/react-fontawesome": "^0.2.2",
"@mui/material": "^6.1.3",
"@mui/material": "^6.1.5",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
Expand Down
19 changes: 17 additions & 2 deletions client/src/pages/HospitalsAround.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ReactDOMServer from 'react-dom/server'; // Import ReactDOMServer to rende
import { useRecoilState } from 'recoil';
import { mode } from '../store/atom';
import 'leaflet-routing-machine'; // Import Leaflet Routing Machine

import Skeleton from '@mui/material/Skeleton';
import Navbar from '../components/Navbar';
import '../styles/Nearbyhospitals.css';

Expand Down Expand Up @@ -302,8 +302,23 @@ const HospitalsAround = () => {
className="h-[50vh] w-full md:w-[70%] md:h-screen "
></div>
</div>
) : locationError ? (
<p>
Having trouble fetching location. Please enable location access in
your browser and reload the page to retry.
</p>
) : (
locationError?<p>Having trouble fetching location. Please enable location access in your browser and reload the page to retry.</p>:<p>Fetching location...</p>
<div
style={{
display: 'flex',
width: '100%',
justifyContent: 'center',
gap: '3rem',
}}
>
<Skeleton variant="rectangular" width={400} height={400} />
<Skeleton variant="rectangular" width={900} height={760} />
</div>
)}
</div>
</>
Expand Down