mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Adjust subscriptions to adapt to the new Table component
This commit is contained in:
parent
48bd56be82
commit
2094ffe6b2
1 changed files with 20 additions and 12 deletions
|
|
@ -27,11 +27,14 @@ export default function SubscriptionsPage(): JSX.Element {
|
|||
}
|
||||
|
||||
const headers = ['Name', 'Email', 'Updated Time']
|
||||
const rows = subscriptions.map((subscription) => [
|
||||
subscription.name,
|
||||
subscription.newsletterEmail,
|
||||
subscription.updatedAt.toString(),
|
||||
])
|
||||
const rows = new Map<string, string[]>()
|
||||
subscriptions.forEach((subscription) =>
|
||||
rows.set(subscription.name, [
|
||||
subscription.name,
|
||||
subscription.newsletterEmail,
|
||||
subscription.updatedAt.toString(),
|
||||
])
|
||||
)
|
||||
|
||||
return (
|
||||
<PrimaryLayout pageTestId="settings-subscriptions-tag">
|
||||
|
|
@ -64,13 +67,18 @@ export default function SubscriptionsPage(): JSX.Element {
|
|||
<Table
|
||||
heading={'Popular Newsletters'}
|
||||
headers={['Substack', 'Axios', 'Bloomberg']}
|
||||
rows={[
|
||||
[
|
||||
'https://substack.com/',
|
||||
'https://www.axios.com/newsletters',
|
||||
'https://www.bloomberg.com/account/newsletters',
|
||||
],
|
||||
]}
|
||||
rows={
|
||||
new Map([
|
||||
[
|
||||
'0',
|
||||
[
|
||||
'https://substack.com/',
|
||||
'https://www.axios.com/newsletters',
|
||||
'https://www.bloomberg.com/account/newsletters',
|
||||
],
|
||||
],
|
||||
])
|
||||
}
|
||||
/>
|
||||
</PrimaryLayout>
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue