fix(admin): resolve JSX namespace and className syntax compilation errors in admin console

This commit is contained in:
Blizzard
2026-07-18 22:21:13 +08:00
parent 0d2929931f
commit d189dd967a
3 changed files with 4 additions and 516 deletions
+2 -2
View File
@@ -265,7 +265,7 @@ export function StatusPage() {
<span className="h-2 w-2 rounded-full bg-violet-600"></span>
</h3>
<p class="text-[10px] text-slate-400 mt-0.5"></p>
<p className="text-[10px] text-slate-400 mt-0.5"></p>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
@@ -305,7 +305,7 @@ export function StatusPage() {
<span className="h-2 w-2 rounded-full bg-cyan-500"></span>
</h3>
<p class="text-[10px] text-slate-400 mt-0.5"></p>
<p className="text-[10px] text-slate-400 mt-0.5"></p>
</div>
<div className="space-y-3.5">
+2 -2
View File
@@ -1,4 +1,4 @@
import { Suspense, useEffect, useState } from "react";
import React, { Suspense, useEffect, useState } from "react";
import { NavLink, Routes, Route, Navigate, useLocation } from "react-router-dom";
import { routes, navGroups, defaultPath } from "../routes";
@@ -7,7 +7,7 @@ import { getStatus, type AuthUser } from "../api";
const ADMIN_BASE = "/admin";
// 路线路径到 SVG 图标的映射
const ICON_MAP: Record<string, JSX.Element> = {
const ICON_MAP: Record<string, React.ReactNode> = {
dashboard: (
<svg className="h-4 w-4" fill="none" stroke="currentColor" strokeWidth="2" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" d="M4 6a2 2 0 012-2h2a2 2 0 012 2v4a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v10a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2z" />