update fallback API URL and add Heading component for consistent typography
This commit is contained in:
1 parent
1c1f28462c
commit
bb51cf1f04
3 files changed
+2180
-793
No files matched your search
Generated
+2147
-792
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,32 @@
|
|||||||
|
import { Typography } from "@mui/material";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A heading component that renders text with a specific heading level.
|
||||||
|
*
|
||||||
|
* @param {Object} props - The properties passed to the Heading component.
|
||||||
|
* @param {('h1'|'h2'|'h3')} props.component - The heading level for the component.
|
||||||
|
* @param {Object} props.style - Custom styles to apply to the heading.
|
||||||
|
* @param {string} props.children - The content to display inside the heading.
|
||||||
|
* @returns {JSX.Element} The Typography component with specified heading properties.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function Subheader({ component, style, children }) {
|
||||||
|
return (
|
||||||
|
<Typography
|
||||||
|
component={component}
|
||||||
|
variant="h2"
|
||||||
|
fontWeight={600}
|
||||||
|
style={style}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</Typography>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Subheader.propTypes = {
|
||||||
|
component: PropTypes.oneOf(["h1", "h2", "h3"]).isRequired,
|
||||||
|
style: PropTypes.object,
|
||||||
|
children: PropTypes.string.isRequired,
|
||||||
|
};
|
||||||
|
export { Subheader };
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
const BASE_URL = import.meta.env.VITE_APP_API_BASE_URL;
|
const BASE_URL = import.meta.env.VITE_APP_API_BASE_URL;
|
||||||
const FALLBACK_BASE_URL = "http://localhost:5000/api/v1";
|
const FALLBACK_BASE_URL = "http://localhost:4000/api/v1";
|
||||||
import { clearAuthState } from "../Features/Auth/authSlice";
|
import { clearAuthState } from "../Features/Auth/authSlice";
|
||||||
import { clearUptimeMonitorState } from "../Features/UptimeMonitors/uptimeMonitorsSlice";
|
import { clearUptimeMonitorState } from "../Features/UptimeMonitors/uptimeMonitorsSlice";
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user