MCPcopy Create free account
hub / github.com/allocnode/oh-my-sage / getDeviceIcon

Function getDeviceIcon

src/components/DevicePanel.tsx:60–66  ·  view source on GitHub ↗

* 获取设备图标

(model: string)

Source from the content-addressed store, hash-verified

58 * 获取设备图标
59 */
60function getDeviceIcon(model: string) {
61 if (model.includes('light') || model.includes('lamp')) return <BulbOutlined/>;
62 if (model.includes('switch') || model.includes('plug')) return <ThunderboltOutlined/>;
63 if (model.includes('camera')) return <CameraOutlined/>;
64 if (model.includes('lock') || model.includes('door')) return <LockOutlined/>;
65 return <BulbOutlined/>;
66}
67
68export default function DevicePanel({
69 collapsed = false,

Callers 1

DevicePanelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected