1
0
mirror of https://github.com/samanhappy/mcphub.git synced 2026-01-11 09:07:01 -05:00

refactor frontend code

This commit is contained in:
samanhappy
2025-04-09 11:29:35 +08:00
parent aada2d29de
commit b1d8b1a825
27 changed files with 1822 additions and 787 deletions

View File

@@ -0,0 +1,23 @@
import { ServerStatus } from '@/types'
interface BadgeProps {
status: ServerStatus
}
const Badge = ({ status }: BadgeProps) => {
const colors = {
connecting: 'bg-yellow-100 text-yellow-800',
connected: 'bg-green-100 text-green-800',
disconnected: 'bg-red-100 text-red-800',
}
return (
<span
className={`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${colors[status]}`}
>
{status}
</span>
)
}
export default Badge