[CHORE] Upgarding Component
This commit is contained in:
parent
8c58951fd3
commit
455ceb11e4
4 changed files with 54 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite --host",
|
"start": "vite --host",
|
||||||
|
"start:dev": "vite",
|
||||||
"build:react": "vite build",
|
"build:react": "vite build",
|
||||||
"lint": "npx prettier -w src/ index.html vite.config.js"
|
"lint": "npx prettier -w src/ index.html vite.config.js"
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,6 +3,7 @@ import Toolbar from "@mui/material/Toolbar";
|
||||||
import Delta from "./pages/delta/Delta.jsx";
|
import Delta from "./pages/delta/Delta.jsx";
|
||||||
import Resume from "./pages/resume/Resume.jsx";
|
import Resume from "./pages/resume/Resume.jsx";
|
||||||
import { useScrollToLocation } from "./hooks.jsx";
|
import { useScrollToLocation } from "./hooks.jsx";
|
||||||
|
import Upgrades from "./Upgrades.jsx";
|
||||||
|
|
||||||
const redirects = [
|
const redirects = [
|
||||||
{ path: "/r1", rewrite: "/resume" },
|
{ path: "/r1", rewrite: "/resume" },
|
||||||
|
@ -15,11 +16,12 @@ export default function Routing() {
|
||||||
<div className="view">
|
<div className="view">
|
||||||
<Toolbar disableGutters />
|
<Toolbar disableGutters />
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<Delta />} />
|
<Route path="/" element={<Upgrades />} />
|
||||||
|
{/*<Route path="/" element={<Delta />} />
|
||||||
<Route path="/resume" element={<Resume />} />
|
<Route path="/resume" element={<Resume />} />
|
||||||
{redirects.map((r, i) => (
|
{redirects.map((r, i) => (
|
||||||
<Route key={i} path={r.path} element={<Navigate to={r.rewrite} />} />
|
<Route key={i} path={r.path} element={<Navigate to={r.rewrite} />} />
|
||||||
))}
|
))} */}
|
||||||
<Route path="*" element={<Navigate to="/" replace />} />
|
<Route path="*" element={<Navigate to="/" replace />} />
|
||||||
<Route path="/*" element={<Navigate to="/" replace />} />
|
<Route path="/*" element={<Navigate to="/" replace />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
|
|
48
src/Upgrades.jsx
Normal file
48
src/Upgrades.jsx
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import Link from "@mui/material/Link"
|
||||||
|
|
||||||
|
// Function to format a date as MMM DD, YYYY
|
||||||
|
function formatDate(date) {
|
||||||
|
const months = [
|
||||||
|
"JAN",
|
||||||
|
"FEB",
|
||||||
|
"MAR",
|
||||||
|
"APR",
|
||||||
|
"MAY",
|
||||||
|
"JUN",
|
||||||
|
"JUL",
|
||||||
|
"AUG",
|
||||||
|
"SEP",
|
||||||
|
"OCT",
|
||||||
|
"NOV",
|
||||||
|
"DEC",
|
||||||
|
];
|
||||||
|
const month = months[date.getMonth()];
|
||||||
|
const day = ("0" + date.getDate()).slice(-2);
|
||||||
|
const year = date.getFullYear();
|
||||||
|
return `${month} ${day}, ${year}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the current date
|
||||||
|
const now = new Date();
|
||||||
|
|
||||||
|
// Get the date 2 weeks from now
|
||||||
|
const twoWeeksFromNow = new Date();
|
||||||
|
twoWeeksFromNow.setDate(now.getDate() + 14);
|
||||||
|
|
||||||
|
export default function Upgrades() {
|
||||||
|
return (
|
||||||
|
<Box height="calc(100vh - 8.8rem)" display="flex">
|
||||||
|
<Box my="auto" mx="auto" flexWrap="wrap" textAlign="center">
|
||||||
|
<Typography variant="h4">Servers currently upgrading!</Typography>
|
||||||
|
<br />
|
||||||
|
<Typography variant="h5">
|
||||||
|
Process Started {formatDate(now)} and will end{" "}
|
||||||
|
{formatDate(twoWeeksFromNow)}
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="h6"> If you need to get in contact with me sooner, please email me at <Link href="mailto:elijahglennparker@outlook.com">elijahglennparker@outlook.com</Link></Typography>
|
||||||
|
</Box>
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
|
@ -8,7 +8,7 @@ export default () => {
|
||||||
port: process.env.VITE_DEV_PORT ?? 5173,
|
port: process.env.VITE_DEV_PORT ?? 5173,
|
||||||
host: "0.0.0.0",
|
host: "0.0.0.0",
|
||||||
hmr: {
|
hmr: {
|
||||||
protocol: process.env.VITE_DEV_PROTOCOL ?? "wss",
|
protocol: process.env.VITE_DEV_PROTOCOL ?? "ws",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue