From f3905fee51ade10929025602ae4147bd49b9a86d Mon Sep 17 00:00:00 2001 From: MuhammadKhalilzadeh Date: Tue, 23 Jul 2024 00:09:03 +0330 Subject: [PATCH] fixing conflicts --- Client/src/App.jsx | 7 ++-- Client/src/Pages/Errors/index.css | 40 ------------------ Client/src/Pages/Errors/index.jsx | 63 ---------------------------- Client/src/Pages/NotFound/index.css | 36 +++++++++++++++- Client/src/Pages/NotFound/index.jsx | 65 +++++++++++++++++++++++++---- 5 files changed, 96 insertions(+), 115 deletions(-) delete mode 100644 Client/src/Pages/Errors/index.css delete mode 100644 Client/src/Pages/Errors/index.jsx diff --git a/Client/src/App.jsx b/Client/src/App.jsx index 8f170e8c5..2015793d7 100644 --- a/Client/src/App.jsx +++ b/Client/src/App.jsx @@ -18,8 +18,8 @@ import NewPasswordConfirmed from "./Pages/Auth/NewPasswordConfirmed"; import ProtectedRoute from "./Components/ProtectedRoute"; import Details from "./Pages/Monitors/Details"; import Maintenance from "./Pages/Maintenance"; -import withAdminCheck from "./HOC/withAdminCheck"; -import Configure from "./Pages/Monitors/Configure"; +import "react-toastify/dist/ReactToastify.css"; +import { ToastContainer } from "react-toastify"; function App() { return ( @@ -81,7 +81,8 @@ function App() { } /> } /> {/* } /> */} - } /> + {/* } /> */} + } /> } /> } /> } /> diff --git a/Client/src/Pages/Errors/index.css b/Client/src/Pages/Errors/index.css deleted file mode 100644 index fef0d001d..000000000 --- a/Client/src/Pages/Errors/index.css +++ /dev/null @@ -1,40 +0,0 @@ -.error-page, -.error-template, -.error-title, -.error-description { - justify-content: center; - align-items: center; -} - -.error-page { - display: flex; - min-height: 100vh; -} - -.error-template { - min-height: 170px; -} - -.error-title, -.error-description { - text-align: center; -} - -.error-title { - font-size: var(--env-var-font-size-large); - color: var(--env-var-color-5); - font-weight: 600; -} - -.error-description { - font-size: var(--env-var-font-size-medium); - font-weight: 500; -} - -.error-page-gap-medium { - height: var(--env-var-spacing-2); -} - -.error-page-gap-xlarge { - height: calc(var(--env-var-spacing-4) + var(--env-var-spacing-2)); -} diff --git a/Client/src/Pages/Errors/index.jsx b/Client/src/Pages/Errors/index.jsx deleted file mode 100644 index afaadfe4a..000000000 --- a/Client/src/Pages/Errors/index.jsx +++ /dev/null @@ -1,63 +0,0 @@ -import Button from "../../Components/Button"; -import "./index.css"; -import React from "react"; -import PropTypes from "prop-types"; - -/** - * 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.", -}; - -/** - * 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 ErrorPage = ({ - title = DefaultValue.title, - desc = DefaultValue.desc, -}) => { - return ( -
-
-
{title}
-
-
{desc}
-
-
-
-
-
- ); -}; - -ErrorPage.propTypes = { - title: PropTypes.string, - desc: PropTypes.string, -}; - -export default ErrorPage; diff --git a/Client/src/Pages/NotFound/index.css b/Client/src/Pages/NotFound/index.css index 937c1ee8d..2863581d6 100644 --- a/Client/src/Pages/NotFound/index.css +++ b/Client/src/Pages/NotFound/index.css @@ -1 +1,35 @@ -/*Notfoundpage styles*/ \ No newline at end of file +/*Notfoundpage styles*/ +.not-found-page, +.not-found-template, +#not-found-title, +#not-found-description { + justify-content: center; + align-items: center; +} + +.not-found-page { + display: flex; + min-height: 100vh; +} + +.not-found-template { + min-height: 170px; +} + +#not-found-title, +#not-found-description { + text-align: center; +} + +#not-found-title { + font-size: var(--env-var-font-size-large); + color: var(--env-var-color-5); + font-weight: 600; + margin-bottom: var(--env-var-spacing-2); +} + +#not-found-description { + font-size: var(--env-var-font-size-medium); + font-weight: 500; + margin-bottom: calc(var(--env-var-spacing-4) + var(--env-var-spacing-2)); +} diff --git a/Client/src/Pages/NotFound/index.jsx b/Client/src/Pages/NotFound/index.jsx index 02138b326..5a55ad5ce 100644 --- a/Client/src/Pages/NotFound/index.jsx +++ b/Client/src/Pages/NotFound/index.jsx @@ -1,10 +1,59 @@ -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 { 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} +
+
+
+
+ ); +}; + +NotFound.propTypes = { + title: PropTypes.string, + desc: PropTypes.string, +}; + +export default NotFound;