From 36a55f189c3a6c11b5ce370522fc313d8d2aa8b9 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 17 Jul 2024 19:23:25 -0700 Subject: [PATCH] Deleted demo page, no longer needed --- Client/src/Pages/Demo/Demo.css | 0 Client/src/Pages/Demo/Demo.jsx | 517 --------------------------------- 2 files changed, 517 deletions(-) delete mode 100644 Client/src/Pages/Demo/Demo.css delete mode 100644 Client/src/Pages/Demo/Demo.jsx diff --git a/Client/src/Pages/Demo/Demo.css b/Client/src/Pages/Demo/Demo.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/Client/src/Pages/Demo/Demo.jsx b/Client/src/Pages/Demo/Demo.jsx deleted file mode 100644 index 441eff7e9..000000000 --- a/Client/src/Pages/Demo/Demo.jsx +++ /dev/null @@ -1,517 +0,0 @@ -import React, { useState } from "react"; -import Button from "../../Components/Button/"; -import ButtonSpinner from "../../Components/ButtonSpinner"; -import Link from "../../Components/Link"; -import { - useTheme, - Switch, - Checkbox, - FormControl, - FormLabel, - FormControlLabel, - Radio, - RadioGroup, - Tab, - Tabs, - Typography, - Stack, - Box, -} from "@mui/material"; -import { ColoredLabel, StatusLabel } from "../../Components/Label/"; -import Avatar from "../../Components/Avatar/"; -import ProgressStepper from "../../Components/ProgressStepper"; -import avatarImage from "../../assets/Images/avatar_placeholder.png"; -import { DataGrid } from "@mui/x-data-grid"; -import { DatePicker } from "@mui/x-date-pickers/DatePicker"; -import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider"; -import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"; -import AddIcon from "@mui/icons-material/Add"; -import Divider from "@mui/material/Divider"; -import UploadIcon from "@mui/icons-material/Upload"; -import SendIcon from "@mui/icons-material/Send"; -import ImageIcon from "@mui/icons-material/Image"; - -// Redux -import { useSelector } from "react-redux"; -import { useDispatch } from "react-redux"; -import { getMonitors } from "../../Features/Monitors/monitorsSlice"; -import { getMonitorsByUserId } from "../../Features/Monitors/monitorsSlice"; -import ImageField from "../../Components/Inputs/Image"; -import ProgressUpload from "../../Components/ProgressBars"; -import Alert from "../../Components/Alert"; -import { createToast } from "../../Utils/toastUtils"; -import Field from "../../Components/Inputs/Field"; - -const cols = [ - { - field: "name", - headerName: "Name", - renderCell: (params) => { - return ( -
- -
- {params.value.firstName} {params.value.lastName} -
-
- ); - }, - flex: 1, - }, - { - field: "status", - headerName: "Status", - renderCell: (params) => { - return ; - }, - flex: 1, - }, - { field: "role", headerName: "Role", flex: 1 }, - { field: "team", headerName: "Team", flex: 1 }, - { field: "hireDate", headerName: "Hire date", flex: 1 }, -]; - -const rows = ((count) => { - const arr = []; - for (let i = 0; i < count; i++) { - let row = { - id: i, - name: { - avatarImage: i % 2 === 0 ? avatarImage : null, - firstName: "Placeholder Name", - lastName: i.toString(), - }, - status: "Active", - role: "Product Designer", - team: "Marketing", - hireDate: new Date().toLocaleDateString(), - }; - arr.push(row); - } - return arr; -})(100); - -const steps = [ - { label: "Your details", content: "Please provide your name and email" }, - { label: "Company details", content: "A few details about your company" }, - { label: "Invite your team", content: "Start collaborating with your team" }, -]; - -const demoMonitors = [ - { id: 0, name: "Google", isActive: true }, - { id: 1, name: "Yahoo", isActive: false }, - { id: 2, name: "Reddit", isActive: true }, -]; - -const Demo = () => { - const dispatch = useDispatch(); - - const [radio, setRadio] = React.useState(1); - const [tab, setTab] = React.useState("departments"); - const [date, setDate] = React.useState("Pick a date!"); - - const handleRadio = (event) => { - setRadio(event.target.value); - }; - - const handleTab = (event, newValue) => { - setTab(newValue); - }; - - const handleDate = (newValue) => { - setDate(newValue.toString()); - }; - - const change = (event, type) => { - alert(event.target.checked ? `${type} checked` : `${type} unchecked`); - }; - - const links = [ - { - name: "Buttons", - url: "#buttons", - }, - { - name: "Disabled Buttons", - url: "#disabled-buttons", - }, - { - name: "Labels", - url: "#labels", - }, - { - name: "Status Labels", - url: "#status-labels", - }, - { - name: "Avatar", - url: "#avatar", - }, - { - name: "Switches", - url: "#switches", - }, - { - name: "Checkboxes", - url: "#checkboxes", - }, - { - name: "Radio", - url: "#radio", - }, - { - name: "Table", - url: "#table", - }, - { - name: "Tabs", - url: "#tabs", - }, - { - name: "Date Picker", - url: "#date-picker", - }, - { - name: "Stepper", - url: "#stepper", - }, - { - name: "Section", - url: "#section", - }, - ]; - - const theme = useTheme(); - - // ********************************* - // Redux Demo - // ********************************* - const monitorState = useSelector((state) => state.monitors); - const { monitors, msg } = monitorState; - - //Button Spinner state - const [isLoading, setIsLoading] = useState(false); - const handleButtonSpinnerClick = () => { - setIsLoading(true); - - setTimeout(() => { - setIsLoading(false); - }, 4000); - }; - - return ( -
-
- Redux Demo - Monitors - - - - - - - {monitors && - monitors.map((monitor) => { - return ( - - - - - ); - })} - -
NameURL
- {monitor.name} - {monitor.url}
-

Message: {msg}

-
-
    - {links.map((link) => ( -
  • - -
  • - ))} -
- -

Buttons

-
-
- -

Disabled Buttons

-
-
-
- -
- -

Labels

-
- - - - -
- -

Status Lables

-
- - - - - -
- -

Avatar

-
- - - - -
- -

Switches

-
- change(event, "Switch")} /> - - - -
- -

Checkboxes

-
- change(event, "Checkbox")} /> - - - -
- -

Radio

-
- - Demo Radio - -
- } label="1" /> - } label="2" /> - } - label="3" - /> - } - label="4" - /> -
-
-
-
- -

Table

-
- -
- -

Tabs

-
- {" "} - - - - - - -
- -

Date Picker

-
- - - -

{date}

-
- -

Stepper

-
- -
- -

Loading Buttons

- - - - - } - onClick={handleButtonSpinnerClick} - isLoading={isLoading} - /> - } - onClick={handleButtonSpinnerClick} - isLoading={isLoading} - /> - - - - - console.log("changed")} - /> - - - - } - label="image.jpg" - size="2 MB" - progress={50} - onClick={() => console.log("click")} - /> - - - - - - - - - - - - - - - - - - - -
- ); -}; -export default Demo;