fix: replace emoji game icons with lucide-react icons
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
import {
|
||||||
|
Bomb,
|
||||||
|
Crosshair,
|
||||||
|
Crown,
|
||||||
|
Flame,
|
||||||
|
type LucideIcon,
|
||||||
|
Shield,
|
||||||
|
Sparkles,
|
||||||
|
Swords,
|
||||||
|
Target,
|
||||||
|
} from "lucide-react"
|
||||||
|
|
||||||
|
const iconMap: Record<string, LucideIcon> = {
|
||||||
|
Swords,
|
||||||
|
Crown,
|
||||||
|
Crosshair,
|
||||||
|
Sparkles,
|
||||||
|
Flame,
|
||||||
|
Target,
|
||||||
|
Shield,
|
||||||
|
Bomb,
|
||||||
|
}
|
||||||
|
|
||||||
|
export function GameIcon({ name, className }: { name: string; className?: string }) {
|
||||||
|
const Icon = iconMap[name]
|
||||||
|
if (!Icon) return null
|
||||||
|
return <Icon className={className} />
|
||||||
|
}
|
||||||
+8
-8
@@ -68,14 +68,14 @@ export const mockUsers: User[] = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export const mockGames: Game[] = [
|
export const mockGames: Game[] = [
|
||||||
{ id: "g1", name: "英雄联盟", icon: "🎮", category: "MOBA" },
|
{ id: "g1", name: "英雄联盟", icon: "Swords", category: "MOBA" },
|
||||||
{ id: "g2", name: "王者荣耀", icon: "👑", category: "MOBA" },
|
{ id: "g2", name: "王者荣耀", icon: "Crown", category: "MOBA" },
|
||||||
{ id: "g3", name: "CS2", icon: "🔫", category: "FPS" },
|
{ id: "g3", name: "CS2", icon: "Crosshair", category: "FPS" },
|
||||||
{ id: "g4", name: "永劫无间", icon: "⚔️", category: "动作" },
|
{ id: "g4", name: "永劫无间", icon: "Flame", category: "动作" },
|
||||||
{ id: "g5", name: "原神", icon: "🌟", category: "RPG" },
|
{ id: "g5", name: "原神", icon: "Sparkles", category: "RPG" },
|
||||||
{ id: "g6", name: "和平精英", icon: "🪖", category: "FPS" },
|
{ id: "g6", name: "和平精英", icon: "Target", category: "FPS" },
|
||||||
{ id: "g7", name: "DOTA2", icon: "🛡️", category: "MOBA" },
|
{ id: "g7", name: "DOTA2", icon: "Shield", category: "MOBA" },
|
||||||
{ id: "g8", name: "无畏契约", icon: "💥", category: "FPS" },
|
{ id: "g8", name: "无畏契约", icon: "Bomb", category: "FPS" },
|
||||||
]
|
]
|
||||||
|
|
||||||
export const mockServices: PlayerService[] = [
|
export const mockServices: PlayerService[] = [
|
||||||
|
|||||||
Reference in New Issue
Block a user