fixing conflicts
This commit is contained in:
1 parent
e4b441dffa
commit
f3905fee51
5 files changed
+96
-115
No files matched your search
+4
-3
@@ -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() {
|
||||
<Route exact path="/login" element={<Login />} />
|
||||
<Route exact path="/register" element={<Register />} />
|
||||
{/* <Route path="/toast" element={<ToastComponent />} /> */}
|
||||
<Route path="*" element={<NotFound />} />
|
||||
{/* <Route path="*" element={<NotFound />} /> */}
|
||||
<Route path="/not-found" element={<NotFound />} />
|
||||
<Route path="/forgot-password" element={<ForgotPassword />} />
|
||||
<Route path="/check-email" element={<CheckEmail />} />
|
||||
<Route path="/set-new-password/:token" element={<SetNewPassword />} />
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
@@ -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:
|
||||
* <ErrorPage
|
||||
* title="Page Not Found"
|
||||
* desc="The requested page could not be found."
|
||||
* />
|
||||
*
|
||||
* @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 (
|
||||
<div className="error-page">
|
||||
<div className="error-template">
|
||||
<div className="error-title">{title}</div>
|
||||
<div className="error-page-gap-medium"></div>
|
||||
<div className="error-description">{desc}</div>
|
||||
<div className="error-page-gap-xlarge"></div>
|
||||
<div
|
||||
className="button-container"
|
||||
style={{ display: "flex", justifyContent: "center" }}
|
||||
>
|
||||
<Button
|
||||
label="Go to the main dashboard"
|
||||
level="primary"
|
||||
id="error-page-action"
|
||||
sx={{ fontSize: "var(--env-var-font-size-medium)" }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
ErrorPage.propTypes = {
|
||||
title: PropTypes.string,
|
||||
desc: PropTypes.string,
|
||||
};
|
||||
|
||||
export default ErrorPage;
|
||||
@@ -1 +1,35 @@
|
||||
/*Notfoundpage styles*/
|
||||
/*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));
|
||||
}
|
||||
@@ -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 (
|
||||
<div>NotFoundPage</div>
|
||||
)
|
||||
}
|
||||
/**
|
||||
* 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
|
||||
/**
|
||||
* Renders an error page component with a customizable title and description.
|
||||
*
|
||||
* @component
|
||||
* @example
|
||||
* // Usage:
|
||||
* <ErrorPage
|
||||
* title="Page Not Found"
|
||||
* desc="The requested page could not be found."
|
||||
* />
|
||||
*
|
||||
* @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 (
|
||||
<div className="not-found-page">
|
||||
<div className="not-found-template">
|
||||
<Typography id="not-found-title">{title}</Typography>
|
||||
<Typography id="not-found-description">{desc}</Typography>
|
||||
<div
|
||||
className="button-container"
|
||||
style={{ display: "flex", justifyContent: "center" }}
|
||||
>
|
||||
<Button
|
||||
label="Go to the main dashboard"
|
||||
level="primary"
|
||||
id="not-found-page-action"
|
||||
sx={{ fontSize: "var(--env-var-font-size-medium)" }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
NotFound.propTypes = {
|
||||
title: PropTypes.string,
|
||||
desc: PropTypes.string,
|
||||
};
|
||||
|
||||
export default NotFound;
|
||||
Reference in new issue
Block a user