Download web/src/components/WatchCard.tsx from loveaa/OneAlign: direct link, hf CLI and curl.
- Browser
- Download file 866 Bytes
-
https://huggingface.co/spaces/loveaa/OneAlign/resolve/main/web/src/components/WatchCard.tsx
- Command line
-
hf download hf://spaces/loveaa/OneAlign/web/src/components/WatchCard.tsx
-
curl -L -o WatchCard.tsx https://huggingface.co/spaces/loveaa/OneAlign/resolve/main/web/src/components/WatchCard.tsx
866 Bytes
| import { Link } from 'react-router' | |
| import { ArrowUpRight } from 'lucide-react' | |
| import { itemStateText,stateBadge,templateOf,type WatchItem } from '@/lib/engine' | |
| import { formatTime } from '@/lib/domain' | |
| import { Badge,TemplateIcon } from './Design' | |
| export default function WatchCard({item,compact=false}:{item:WatchItem;compact?:boolean}){const badge=stateBadge(item),t=templateOf(item);return <Link to={'/watch/'+item.id} className={'watch-card '+(compact?'compact':'')}><div className="watch-card-top"><span className={'template-icon template-'+t.icon}><TemplateIcon name={t.icon}/></span><Badge tone={badge.tone}>{badge.text}</Badge></div><h3>{item.name}</h3><p>{itemStateText(item)}</p><div className="watch-card-bottom"><span>{item.camera}<i/>{item.updatedAt?formatTime(item.updatedAt)+' 更新':'尚未取证'}</span><ArrowUpRight size={16}/></div></Link>} | |