MCPcopy Create free account
hub / github.com/Packstack-Tech/packstack / Statistics

Function Statistics

frontend/src/app/components/Statistics/index.tsx:18–39  ·  view source on GitHub ↗
({ pack })

Source from the content-addressed store, hash-verified

16}
17
18const Statistics: React.FC<StatProps> = ({ pack }) => {
19 const { season, duration, duration_unit, gender, temp_range, id, title } = pack;
20 const durationValue = () => {
21 if (!duration) {
22 return null;
23 }
24 return `${duration} ${duration_unit}`;
25 };
26
27 const packUrl = `https://packstack.io${getPackPath(id, title)}`;
28
29 return (
30 <StatCollection>
31 <Stat label="Season" value={season} icon={<Icon component={CalendarIcon}/>}/>
32 <Stat label="Temp Range" value={temp_range} icon={<Icon component={TempIcon}/>}/>
33 <Stat label="Duration" value={durationValue()} icon={<Icon component={FootprintsIcon}/>}/>
34 <Stat label="Gender" value={getGenderName(gender)}/>
35 <Stat label="Pack URL" value={packUrl} icon={<Icon type="link"/>}/>
36 </StatCollection>
37 )
38
39};
40
41export default Statistics;

Callers

nothing calls this directly

Calls 3

getPackPathFunction · 0.90
getGenderNameFunction · 0.90
durationValueFunction · 0.85

Tested by

no test coverage detected