diff --git a/Client/src/Pages/NotFound/index.css b/Client/src/Pages/NotFound/index.css index 937c1ee8d..621172386 100644 --- a/Client/src/Pages/NotFound/index.css +++ b/Client/src/Pages/NotFound/index.css @@ -1 +1,15 @@ -/*Notfoundpage styles*/ \ No newline at end of file +.not-found-page { + height: 100vh; +} +.not-found-page button, +.not-found-page p { + font-size: var(--env-var-font-size-medium); +} +.not-found-page h1 { + font-size: var(--env-var-font-size-large); + font-weight: 600; +} +.not-found-page h1, +.not-found-page p { + color: var(--env-var-color-5); +} diff --git a/Client/src/Pages/NotFound/index.jsx b/Client/src/Pages/NotFound/index.jsx index 02138b326..1b2accbc0 100644 --- a/Client/src/Pages/NotFound/index.jsx +++ b/Client/src/Pages/NotFound/index.jsx @@ -1,10 +1,53 @@ -import React from 'react' -import './index.css' +import Button from "../../Components/Button"; +import "./index.css"; +import React from "react"; +import PropTypes from "prop-types"; +import { Stack, Typography } from "@mui/material"; -const NotFound = () => { - return ( -
NotFoundPage
- ) -} +/** + * Support for defaultProps will be removed from function components in a future major release + * So That why we're using JavaScript default parameters instead. + */ +const DefaultValue = { + title: "We cannot find this page", + desc: "Either the URL doesn’t exist, or you don’t have access to it.", +}; -export default NotFound \ No newline at end of file +/** + * Renders an error page component with a customizable title and description. + * + * @component + * @example + * // Usage: + * + * + * @param {Object} props - The component props. + * @param {string} [props.title="We cannot find this page"] - The title of the error page. + * @param {string} [props.desc="Either the URL doesn’t exist, or you don’t have access to it."] - The description of the error page. + * @returns {JSX.Element} The rendered error page component. + */ +const NotFound = ({ title = DefaultValue.title, desc = DefaultValue.desc }) => { + return ( + + + {title} + {desc} +