From ac598205d049629e8b2340fec9b2da5c7d15badb Mon Sep 17 00:00:00 2001 From: Brad Traversy Date: Tue, 9 Jul 2024 11:12:21 -0400 Subject: [PATCH] Not found and loading pages --- app/loading.jsx | 20 ++++++++++++++++++++ app/not-found.jsx | 30 ++++++++++++++++++++++++++++++ components/PropertyCard.jsx | 10 ++++++++-- package-lock.json | 13 ++++++++++++- package.json | 3 ++- 5 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 app/loading.jsx create mode 100644 app/not-found.jsx diff --git a/app/loading.jsx b/app/loading.jsx new file mode 100644 index 0000000..45f9eb6 --- /dev/null +++ b/app/loading.jsx @@ -0,0 +1,20 @@ +'use client'; +import ClipLoader from 'react-spinners/ClipLoader'; + +const override = { + display: 'block', + margin: '100px auto', +}; + +const loading = ({ loading }) => { + return ( + + ); +}; +export default loading; diff --git a/app/not-found.jsx b/app/not-found.jsx new file mode 100644 index 0000000..b2594ff --- /dev/null +++ b/app/not-found.jsx @@ -0,0 +1,30 @@ +import Link from 'next/link'; +import { FaExclamationTriangle } from 'react-icons/fa'; + +const NotFoundPage = () => { + return ( +
+
+
+
+ +
+
+

Page Not Found

+

+ The page you are looking for does not exist. +

+ + Go Home + +
+
+
+
+
+ ); +}; +export default NotFoundPage; diff --git a/components/PropertyCard.jsx b/components/PropertyCard.jsx index c7833d4..27e4079 100644 --- a/components/PropertyCard.jsx +++ b/components/PropertyCard.jsx @@ -1,6 +1,12 @@ import Image from 'next/image'; import Link from 'next/link'; -import { FaBed, FaBath, FaRulerCombined, FaMoneyBill } from 'react-icons/fa'; +import { + FaBed, + FaBath, + FaRulerCombined, + FaMoneyBill, + FaMapMarker, +} from 'react-icons/fa'; const PropertyCard = ({ property }) => { const getRateDisplay = () => { @@ -63,7 +69,7 @@ const PropertyCard = ({ property }) => {
- + {' '} {property.location.city}, {property.location.state} diff --git a/package-lock.json b/package-lock.json index d24df9b..df7b74a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,8 @@ "next": "14.2.4", "react": "^18", "react-dom": "^18", - "react-icons": "^5.2.1" + "react-icons": "^5.2.1", + "react-spinners": "^0.14.1" }, "devDependencies": { "postcss": "^8", @@ -1369,6 +1370,16 @@ "react": "*" } }, + "node_modules/react-spinners": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/react-spinners/-/react-spinners-0.14.1.tgz", + "integrity": "sha512-2Izq+qgQ08HTofCVEdcAQCXFEYfqTDdfeDQJeo/HHQiQJD4imOicNLhkfN2eh1NYEWVOX4D9ok2lhuDB0z3Aag==", + "license": "MIT", + "peerDependencies": { + "react": "^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", diff --git a/package.json b/package.json index 1037550..ca15ad5 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "next": "14.2.4", "react": "^18", "react-dom": "^18", - "react-icons": "^5.2.1" + "react-icons": "^5.2.1", + "react-spinners": "^0.14.1" }, "devDependencies": { "postcss": "^8",