()
| 49 | if (pack) { |
| 50 | const catWeights = getWeightByCategory(unit, pack.items); |
| 51 | const Sidebar = () => ( |
| 52 | <> |
| 53 | <Statistics pack={pack}/> |
| 54 | <CategoryTable data={catWeights} unit={unit}/> |
| 55 | <CategoryChart data={catWeights}/> |
| 56 | </> |
| 57 | ); |
| 58 | |
| 59 | dispatch({ type: 'setTitle', value: 'Details' }); |
| 60 | dispatch({ type: 'setContent', value: Sidebar() }) |