Remove unused stuff

This commit is contained in:
powermaker450 2024-09-11 23:46:34 -04:00
parent 65faa26245
commit ca4afb1896
8 changed files with 11 additions and 18 deletions

View file

@ -1,15 +1,14 @@
import React from "react";
import "./App.css"; import "./App.css";
import { Route, Routes } from "react-router-dom"; import { Route, Routes } from "react-router-dom";
import Home from "./pages/Home"; import Home from "./pages/Home";
import NotFound from "./pages/NotFound"; import NotFound from "./pages/NotFound";
import ReviewsPage from "./pages/ReviewsPage"; import ReviewsPage from "./pages/ReviewsPage";
import { useState } from "react"; import { useState } from "react";
import { ServerSideReview } from "./types";
function App() { function App() {
const [endpoint, setEndpoint] = useState(""); const [endpoint, setEndpoint] = useState("");
const [secure, setSecure] = useState(false); const [secure, setSecure] = useState(false);
const [currentReviews, setCurrentReviews] = useState<ServerSideReview[]>([]);
return ( return (
<Routes> <Routes>

View file

@ -1,5 +1,5 @@
import React from "react";
import { Button, Grid2 } from "@mui/material"; import { Button, Grid2 } from "@mui/material";
import React, { ReactNode } from "react";
export interface ActionProps { export interface ActionProps {
name: string; name: string;

View file

@ -1,3 +1,4 @@
import React, { useState } from "react";
import { import {
Button, Button,
Checkbox, Checkbox,
@ -12,8 +13,6 @@ import {
Zoom, Zoom,
} from "@mui/material"; } from "@mui/material";
import SettingsIcon from "@mui/icons-material/Settings"; import SettingsIcon from "@mui/icons-material/Settings";
import React, { useState } from "react";
import { CheckBox } from "@mui/icons-material";
export interface EndpointDialogProps { export interface EndpointDialogProps {
endpoint: string; endpoint: string;

View file

@ -1,5 +1,5 @@
import { Button, ButtonGroup, Tooltip, Zoom } from "@mui/material";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { Button, ButtonGroup, Tooltip, Zoom } from "@mui/material";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
function PageSwitcher() { function PageSwitcher() {

View file

@ -1,5 +1,5 @@
import { Box, Stack, TextField } from "@mui/material";
import React, { useState } from "react"; import React, { useState } from "react";
import { Box, Stack, TextField } from "@mui/material";
export interface ReviewFieldProps { export interface ReviewFieldProps {
name: string; name: string;

View file

@ -1,3 +1,4 @@
import React from "react";
import { import {
List, List,
ListItem, ListItem,
@ -8,7 +9,6 @@ import {
Typography, Typography,
} from "@mui/material"; } from "@mui/material";
import { ServerSideReview } from "../types"; import { ServerSideReview } from "../types";
import React from "react";
export interface ShowReviewsProps { export interface ShowReviewsProps {
reviews: ServerSideReview[]; reviews: ServerSideReview[];

View file

@ -6,15 +6,12 @@ import { StrictMode } from "react";
import { createRoot } from "react-dom/client"; import { createRoot } from "react-dom/client";
import App from "./App.tsx"; import App from "./App.tsx";
import "./index.css"; import "./index.css";
import { createTheme } from "@mui/material";
import { BrowserRouter } from "react-router-dom"; import { BrowserRouter } from "react-router-dom";
const theme = createTheme({
spacing: 4,
});
createRoot(document.getElementById("root")!).render( createRoot(document.getElementById("root")!).render(
<StrictMode>
<BrowserRouter> <BrowserRouter>
<App /> <App />
</BrowserRouter>, </BrowserRouter>,
</StrictMode>
); );

View file

@ -23,8 +23,6 @@ function ReviewsPage({ endpoint, secure }: ReviewsPageProps) {
const [statusTextColor, setStatusTextColor] = useState("rgb(140, 140, 140)"); const [statusTextColor, setStatusTextColor] = useState("rgb(140, 140, 140)");
const [currentReviews, setCurrentReviews] = useState<ServerSideReview[]>([]); const [currentReviews, setCurrentReviews] = useState<ServerSideReview[]>([]);
const minutes = (time: number): number => time * 60000;
const loadReviews = async () => { const loadReviews = async () => {
setLoading(true); setLoading(true);
setStatusText("Loading..."); setStatusText("Loading...");