diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsx index dfc875780..b7bd324ed 100644 --- a/frontend/src/app/App.tsx +++ b/frontend/src/app/App.tsx @@ -3,7 +3,7 @@ import { Route, BrowserRouter as Router, Routes, useParams } from "react-router- import ProtectedRoutes from "./components/routing"; import ScrollToTop from "./common/scroll-to-top"; -import NotAuthorized, { NotFound } from "./components/containers/pages"; +import { NotAuthorized, NotFound } from "./components/containers/pages"; import { ComplaintDetailsEdit } from "./components/containers/complaints/details/complaint-details-edit"; import ColorReference, { MiscReference, SpaceReference } from "./components/reference"; import { ModalComponent as Modal } from "./components/modal/modal"; diff --git a/frontend/src/app/components/containers/pages/index.ts b/frontend/src/app/components/containers/pages/index.ts index 33ac613dd..66659d3f2 100644 --- a/frontend/src/app/components/containers/pages/index.ts +++ b/frontend/src/app/components/containers/pages/index.ts @@ -1,6 +1,6 @@ import NotAuthorized from "./not-authorized"; -import { NotFound } from "./not-found"; +import NotFound from "./not-found"; export { NotFound }; -export default NotAuthorized; +export { NotAuthorized }; diff --git a/frontend/src/app/components/containers/pages/not-authorized.tsx b/frontend/src/app/components/containers/pages/not-authorized.tsx index 52712e5a0..6472fbbb0 100644 --- a/frontend/src/app/components/containers/pages/not-authorized.tsx +++ b/frontend/src/app/components/containers/pages/not-authorized.tsx @@ -1,6 +1,7 @@ import { FC } from "react"; import { Footer, Header } from "../../containers/layout"; import { BsPersonFillSlash } from "react-icons/bs"; +import { Link } from "react-router-dom"; const NotAuthorized: FC = () => { return ( @@ -10,8 +11,19 @@ const NotAuthorized: FC = () => {
-

Sorry, you are not authorized to access this site

If you think you - should have access, please contact CEDS@gov.bc.ca +
+

Sorry, you are not authorized to access this site.

+ +

+ If you believe you should have access, return to the home page to try + logging in again. +

+ +

+ If the problem persists, contact the Compliance & Enforcement Digital Services team at{" "} + CEDS@gov.bc.ca. +

+
diff --git a/frontend/src/app/components/containers/pages/not-found.tsx b/frontend/src/app/components/containers/pages/not-found.tsx index 1719e516d..3ae3f8ac4 100644 --- a/frontend/src/app/components/containers/pages/not-found.tsx +++ b/frontend/src/app/components/containers/pages/not-found.tsx @@ -1,3 +1,34 @@ -export const NotFound = () => { - return

The page or content you are looking for is not found.

; +import { FC } from "react"; +import { Footer, Header } from "../../containers/layout"; +import { BsFileEarmarkX } from "react-icons/bs"; +import { Link } from "react-router-dom"; + +const NotFound: FC = () => { + return ( +
+
+ +
+
+ +
+

The page or content you are looking for could not be found.

+ +

+ Return to the home page to try again. +

+ +

+ If the problem persists, contact the Compliance & Enforcement Digital Services team at{" "} + CEDS@gov.bc.ca. +

+
+
+
+ +
+ ); }; + +export default NotFound; diff --git a/frontend/src/app/components/error-handling/generic-error-boundary.tsx b/frontend/src/app/components/error-handling/generic-error-boundary.tsx index c1beda95f..2bd849e4e 100644 --- a/frontend/src/app/components/error-handling/generic-error-boundary.tsx +++ b/frontend/src/app/components/error-handling/generic-error-boundary.tsx @@ -55,9 +55,20 @@ const GenericErrorBoundary: FC = ({ children }) => {
{/*
*/} -

System error

Please refresh the page to try again. If you still have - problems, contact the Compliance & Enforcement Digital Services team at{" "} - CEDS@gov.bc.ca +
+

System error

+ + {/* */} +

+ Refresh the page or return to the home page to try again. +

+ +

+ If the problem persists, contact the Compliance & Enforcement Digital Services team at{" "} + CEDS@gov.bc.ca. +

+
diff --git a/frontend/src/assets/sass/errors.scss b/frontend/src/assets/sass/errors.scss index 670a0ffec..e4460b45b 100644 --- a/frontend/src/assets/sass/errors.scss +++ b/frontend/src/assets/sass/errors.scss @@ -1,18 +1,42 @@ .error-container { - margin-top: auto; - position: relative; + display: flex; + align-items: center; /* Center items */ + justify-content: center; /* Center horizontally */ + height: 100vh; /* Full height of the viewport */ .message { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); + display: flex; + flex-direction: column; /* Stack all children vertically */ + align-items: center; /* Center items */ + text-align: center; /* Center text on small screens */ svg { - height: 175px; + height: 175px; /* Set size of icon */ width: 175px; - float: left; - padding-right: 25px; + margin-bottom: 25px; /* Space between SVG and text on mobile */ + } + } +} + +/* Media query for larger screens */ +@media (min-width: 768px) { + .error-container { + flex-direction: row; /* Align horizontally on larger screens */ + + .message { + flex-direction: row; /* Align horizontally on larger screens*/ + align-items: center; /* Align SVG and text vertically */ + text-align: left; /* Align text to the left on larger screens */ + + svg { + margin-bottom: 0; /* Remove bottom margin */ + margin-right: 25px; /* Space between SVG and text */ + } + + /* We want the title and subsequent paragraphs to stack beside the icon */ + .message-details { + flex-direction: column; /* Align all messages vertically */ + } } } }