({ subject, propsArray }: RowProps)
| 143 | }; |
| 144 | |
| 145 | function Row({ subject, propsArray }: RowProps): JSX.Element { |
| 146 | const resource = useResource(subject, { |
| 147 | // We don't need to fetch all members for Collections when looking at a Table view. |
| 148 | allowIncomplete: true, |
| 149 | }); |
| 150 | if (resource === null) { |
| 151 | return null; |
| 152 | } |
| 153 | return ( |
| 154 | <RowStyled about={subject}> |
| 155 | <CellStyled> |
| 156 | <ResourceInline subject={subject} /> |
| 157 | </CellStyled> |
| 158 | {propsArray.map(prop => { |
| 159 | return <Cell key={prop} resource={resource} prop={prop} />; |
| 160 | })} |
| 161 | </RowStyled> |
| 162 | ); |
| 163 | } |
| 164 | |
| 165 | const RowStyled = styled.tr` |
| 166 | background-color: ${p => p.theme.colors.bg}; |
nothing calls this directly
no test coverage detected