mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-11 09:27:30 +00:00
fix(frontend): imports are unused
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { Route, Routes } from "react-router-dom";
|
||||
import FirstTimeAdminSetup from "./components/FirstTimeAdminSetup";
|
||||
import Layout from "./components/Layout";
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
Settings as SettingsIcon,
|
||||
X,
|
||||
} from "lucide-react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useTheme } from "../contexts/ThemeContext";
|
||||
import { dashboardPreferencesAPI } from "../utils/api";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { AlertCircle, CheckCircle, Shield, UserPlus } from "lucide-react";
|
||||
import React, { useState } from "react";
|
||||
import { useState } from "react";
|
||||
import { useAuth } from "../contexts/AuthContext";
|
||||
|
||||
const FirstTimeAdminSetup = () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Check, Edit2, X } from "lucide-react";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
const InlineEdit = ({
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
import { Check, ChevronDown, Edit2, X } from "lucide-react";
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
|
||||
const InlineGroupEdit = ({
|
||||
value,
|
||||
|
||||
@@ -5,10 +5,6 @@ import {
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
Clock,
|
||||
Cog,
|
||||
Container,
|
||||
FileText,
|
||||
GitBranch,
|
||||
Github,
|
||||
Globe,
|
||||
Home,
|
||||
@@ -23,17 +19,16 @@ import {
|
||||
Settings,
|
||||
Shield,
|
||||
Star,
|
||||
User,
|
||||
UserCircle,
|
||||
Users,
|
||||
Wrench,
|
||||
X,
|
||||
} from "lucide-react";
|
||||
import React, { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { Link, useLocation } from "react-router-dom";
|
||||
import { useAuth } from "../contexts/AuthContext";
|
||||
import { useUpdateNotification } from "../contexts/UpdateNotificationContext";
|
||||
import { dashboardAPI, formatRelativeTime, versionAPI } from "../utils/api";
|
||||
import { dashboardAPI, versionAPI } from "../utils/api";
|
||||
import UpgradeNotificationIcon from "./UpgradeNotificationIcon";
|
||||
|
||||
const Layout = ({ children }) => {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { Navigate } from "react-router-dom";
|
||||
import { useAuth } from "../contexts/AuthContext";
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ArrowUpCircle } from "lucide-react";
|
||||
import React from "react";
|
||||
|
||||
const UpgradeNotificationIcon = ({ className = "h-4 w-4", show = true }) => {
|
||||
if (!show) return null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {
|
||||
import {
|
||||
createContext,
|
||||
useCallback,
|
||||
useContext,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { createContext, useContext, useEffect, useState } from "react";
|
||||
import { createContext, useContext, useEffect, useState } from "react";
|
||||
|
||||
const ThemeContext = createContext();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import React, { createContext, useContext, useState } from "react";
|
||||
import { createContext, useContext, useState } from "react";
|
||||
import { settingsAPI, versionAPI } from "../utils/api";
|
||||
import { useAuth } from "./AuthContext";
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { BrowserRouter } from "react-router-dom";
|
||||
import App from "./App.jsx";
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
} from "chart.js";
|
||||
import {
|
||||
AlertTriangle,
|
||||
Clock,
|
||||
Folder,
|
||||
GitBranch,
|
||||
Package,
|
||||
@@ -23,7 +22,7 @@ import {
|
||||
Users,
|
||||
WifiOff,
|
||||
} from "lucide-react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Bar, Pie } from "react-chartjs-2";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import DashboardSettingsModal from "../components/DashboardSettingsModal";
|
||||
|
||||
@@ -4,18 +4,14 @@ import {
|
||||
AlertTriangle,
|
||||
ArrowLeft,
|
||||
Calendar,
|
||||
Check,
|
||||
CheckCircle,
|
||||
ChevronDown,
|
||||
ChevronUp,
|
||||
Clock,
|
||||
Code,
|
||||
Copy,
|
||||
Cpu,
|
||||
Edit,
|
||||
Eye,
|
||||
EyeOff,
|
||||
Globe,
|
||||
HardDrive,
|
||||
Key,
|
||||
MemoryStick,
|
||||
@@ -25,13 +21,11 @@ import {
|
||||
Server,
|
||||
Shield,
|
||||
Terminal,
|
||||
ToggleLeft,
|
||||
ToggleRight,
|
||||
Trash2,
|
||||
Wifi,
|
||||
X,
|
||||
} from "lucide-react";
|
||||
import React, { useId, useState } from "react";
|
||||
import { useId, useState } from "react";
|
||||
import { Link, useNavigate, useParams } from "react-router-dom";
|
||||
import InlineEdit from "../components/InlineEdit";
|
||||
import {
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import {
|
||||
AlertTriangle,
|
||||
CheckCircle,
|
||||
Edit,
|
||||
Plus,
|
||||
Server,
|
||||
Trash2,
|
||||
Users,
|
||||
} from "lucide-react";
|
||||
import React, { useId, useState } from "react";
|
||||
import { AlertTriangle, Edit, Plus, Server, Trash2 } from "lucide-react";
|
||||
import { useId, useState } from "react";
|
||||
import { hostGroupsAPI } from "../utils/api";
|
||||
|
||||
const HostGroups = () => {
|
||||
|
||||
@@ -17,18 +17,16 @@ import {
|
||||
EyeOff as EyeOffIcon,
|
||||
Filter,
|
||||
GripVertical,
|
||||
Key,
|
||||
Plus,
|
||||
RefreshCw,
|
||||
Search,
|
||||
Server,
|
||||
Settings,
|
||||
Square,
|
||||
Trash2,
|
||||
Users,
|
||||
X,
|
||||
} from "lucide-react";
|
||||
import React, { useEffect, useId, useState } from "react";
|
||||
import { useEffect, useId, useState } from "react";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import InlineEdit from "../components/InlineEdit";
|
||||
import InlineGroupEdit from "../components/InlineGroupEdit";
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
User,
|
||||
} from "lucide-react";
|
||||
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useAuth } from "../contexts/AuthContext";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import {
|
||||
AlertTriangle,
|
||||
CheckCircle,
|
||||
Edit,
|
||||
Plus,
|
||||
Server,
|
||||
@@ -9,7 +8,7 @@ import {
|
||||
Trash2,
|
||||
Users,
|
||||
} from "lucide-react";
|
||||
import React, { useId, useState } from "react";
|
||||
import { useId, useState } from "react";
|
||||
import { hostGroupsAPI } from "../utils/api";
|
||||
|
||||
const Options = () => {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Package } from "lucide-react";
|
||||
import React from "react";
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
const PackageDetail = () => {
|
||||
|
||||
@@ -4,23 +4,19 @@ import {
|
||||
ArrowDown,
|
||||
ArrowUp,
|
||||
ArrowUpDown,
|
||||
ChevronDown,
|
||||
Columns,
|
||||
ExternalLink,
|
||||
Eye as EyeIcon,
|
||||
EyeOff as EyeOffIcon,
|
||||
Filter,
|
||||
GripVertical,
|
||||
Package,
|
||||
RefreshCw,
|
||||
Search,
|
||||
Server,
|
||||
Settings,
|
||||
Shield,
|
||||
X,
|
||||
} from "lucide-react";
|
||||
import React, { useEffect, useMemo, useState } from "react";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { dashboardAPI } from "../utils/api";
|
||||
|
||||
const Packages = () => {
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
BarChart3,
|
||||
Download,
|
||||
Edit,
|
||||
Eye,
|
||||
Package,
|
||||
Plus,
|
||||
RefreshCw,
|
||||
@@ -16,7 +15,7 @@ import {
|
||||
Users,
|
||||
X,
|
||||
} from "lucide-react";
|
||||
import React, { useEffect, useId, useState } from "react";
|
||||
import { useEffect, useId, useState } from "react";
|
||||
import { useAuth } from "../contexts/AuthContext";
|
||||
import { permissionsAPI } from "../utils/api";
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
Key,
|
||||
Mail,
|
||||
Moon,
|
||||
QrCode,
|
||||
RefreshCw,
|
||||
Save,
|
||||
Settings,
|
||||
@@ -20,7 +19,7 @@ import {
|
||||
User,
|
||||
} from "lucide-react";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import { useAuth } from "../contexts/AuthContext";
|
||||
import { useTheme } from "../contexts/ThemeContext";
|
||||
@@ -34,10 +33,8 @@ const Profile = () => {
|
||||
const currentPasswordId = useId();
|
||||
const newPasswordId = useId();
|
||||
const confirmPasswordId = useId();
|
||||
const verificationTokenId = useId();
|
||||
const disablePasswordId = useId();
|
||||
const { user, updateProfile, changePassword } = useAuth();
|
||||
const { theme, toggleTheme, isDark } = useTheme();
|
||||
const { toggleTheme, isDark } = useTheme();
|
||||
const [activeTab, setActiveTab] = useState("profile");
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [message, setMessage] = useState({ type: "", text: "" });
|
||||
|
||||
@@ -8,7 +8,6 @@ import {
|
||||
Columns,
|
||||
Database,
|
||||
Eye,
|
||||
Globe,
|
||||
GripVertical,
|
||||
Lock,
|
||||
RefreshCw,
|
||||
@@ -20,7 +19,7 @@ import {
|
||||
Users,
|
||||
X,
|
||||
} from "lucide-react";
|
||||
import React, { useMemo, useState } from "react";
|
||||
import { useMemo, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { repositoryAPI } from "../utils/api";
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import {
|
||||
Activity,
|
||||
AlertTriangle,
|
||||
ArrowLeft,
|
||||
Calendar,
|
||||
@@ -14,7 +13,7 @@ import {
|
||||
Users,
|
||||
} from "lucide-react";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import { Link, useParams } from "react-router-dom";
|
||||
import { repositoryAPI } from "../utils/api";
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
X,
|
||||
} from "lucide-react";
|
||||
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import UpgradeNotificationIcon from "../components/UpgradeNotificationIcon";
|
||||
import { useUpdateNotification } from "../contexts/UpdateNotificationContext";
|
||||
import {
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
User,
|
||||
XCircle,
|
||||
} from "lucide-react";
|
||||
import React, { useId, useState } from "react";
|
||||
import { useId, useState } from "react";
|
||||
import { useAuth } from "../contexts/AuthContext";
|
||||
import { adminUsersAPI, permissionsAPI } from "../utils/api";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user