Skip to content

Commit

Permalink
fix: add missing tbody elements
Browse files Browse the repository at this point in the history
  • Loading branch information
angusfretwell committed Jul 4, 2017
1 parent 1a35fa4 commit a4cfa12
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 71 deletions.
36 changes: 19 additions & 17 deletions src/components/Downloads/components/Infographics/Infographics.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,27 @@ export default () => (

<TableWrapper>
<Table>
{downloads.map(({ name, download, filetype, filesize }) => (
<tr>
<td>{name}</td>
<tbody>
{downloads.map(({ name, download, filetype, filesize }) => (
<tr>
<td>{name}</td>

<td>
<a href={download}>
<FormattedMessage id="downloads.infographics.download" />
&nbsp;
({filetype})
</a>
</td>
<td>
<a href={download}>
<FormattedMessage id="downloads.infographics.download" />
&nbsp;
({filetype})
</a>
</td>

<td>
<Text as="span" color="gray.7" heavy>
{filesize}
</Text>
</td>
</tr>
))}
<td>
<Text as="span" color="gray.7" heavy>
{filesize}
</Text>
</td>
</tr>
))}
</tbody>
</Table>
</TableWrapper>
</Container>
Expand Down
76 changes: 39 additions & 37 deletions src/components/Downloads/components/Wallet/Wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,48 +39,50 @@ export default () => (

<TableWrapper>
<Table>
{downloads.map(({ platform, icon, builds }) =>
builds.map((build, buildIndex) =>
build.architectures.map((architecture, architectureIndex) => (
<tr>
{buildIndex === 0 &&
<th rowSpan={builds.reduce((a, { architectures: b }) => a + b.length, 0)}>
<Icon src={icons[icon]} />
<FormattedMessage id={platform} />
</th>
}
<tbody>
{downloads.map(({ platform, icon, builds }) =>
builds.map((build, buildIndex) =>
build.architectures.map((architecture, architectureIndex) => (
<tr>
{buildIndex === 0 &&
<th rowSpan={builds.reduce((a, { architectures: b }) => a + b.length, 0)}>
<Icon src={icons[icon]} />
<FormattedMessage id={platform} />
</th>
}

{architectureIndex === 0 &&
<td rowSpan={build.architectures.length}>
<FormattedMessage id={build.name} />
</td>
}
{architectureIndex === 0 &&
<td rowSpan={build.architectures.length}>
<FormattedMessage id={build.name} />
</td>
}

<td>{architecture.name}</td>
<td>{architecture.name}</td>

<td>
<a href={architecture.download}>
<FormattedMessage id="downloads.wallet.download" />
&nbsp;
({architecture.filetype})
</a>
</td>
<td>
<a href={architecture.download}>
<FormattedMessage id="downloads.wallet.download" />
&nbsp;
({architecture.filetype})
</a>
</td>

<td>
<a href={architecture.torrent}>
<FormattedMessage id="downloads.wallet.torrent" />
</a>
</td>
<td>
<a href={architecture.torrent}>
<FormattedMessage id="downloads.wallet.torrent" />
</a>
</td>

<td>
<Text as="span" color="gray.7" heavy>
{architecture.filesize}
</Text>
</td>
</tr>
)),
),
)}
<td>
<Text as="span" color="gray.7" heavy>
{architecture.filesize}
</Text>
</td>
</tr>
)),
),
)}
</tbody>
</Table>
</TableWrapper>
</Container>
Expand Down
36 changes: 19 additions & 17 deletions src/components/Downloads/components/Whitepapers/Whitepapers.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,27 @@ export default () => (

<TableWrapper>
<Table>
{downloads.map(({ name, download, filetype, filesize }) => (
<tr>
<td>{name}</td>
<tbody>
{downloads.map(({ name, download, filetype, filesize }) => (
<tr>
<td>{name}</td>

<td>
<a href={download}>
<FormattedMessage id="downloads.whitepapers.download" />
&nbsp;
({filetype})
</a>
</td>
<td>
<a href={download}>
<FormattedMessage id="downloads.whitepapers.download" />
&nbsp;
({filetype})
</a>
</td>

<td>
<Text as="span" color="gray.7" heavy>
{filesize}
</Text>
</td>
</tr>
))}
<td>
<Text as="span" color="gray.7" heavy>
{filesize}
</Text>
</td>
</tr>
))}
</tbody>
</Table>
</TableWrapper>
</Container>
Expand Down

0 comments on commit a4cfa12

Please sign in to comment.