Skip to content

Commit

Permalink
feat(explore): Samples table pagination (getsentry#76343)
Browse files Browse the repository at this point in the history
This adds the pagination buttons to the bottom of the page on the
samples table.
  • Loading branch information
Zylphrex authored Aug 16, 2024
1 parent a032c87 commit 25b2ebd
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions static/app/views/explore/tables/spansTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {useMemo} from 'react';
import {Fragment, useMemo} from 'react';

import Pagination from 'sentry/components/pagination';
import type {NewQuery} from 'sentry/types/organization';
import EventView from 'sentry/utils/discover/eventView';
import {DiscoverDatasets} from 'sentry/utils/discover/types';
Expand Down Expand Up @@ -39,20 +40,23 @@ export function SpansTable({}: SpansTableProps) {
});

return (
// TODO: make this prettier
<table>
<tr>
{fields.map(field => (
<th key={field}>{field}</th>
))}
</tr>
{result.data?.map((row, i) => (
<tr key={i}>
<Fragment>
{/* TODO: make this prettier */}
<table>
<tr>
{fields.map(field => (
<th key={field}>{row[field]}</th>
<th key={field}>{field}</th>
))}
</tr>
))}
</table>
{result.data?.map((row, i) => (
<tr key={i}>
{fields.map(field => (
<th key={field}>{row[field]}</th>
))}
</tr>
))}
</table>
<Pagination pageLinks={result.pageLinks} />
</Fragment>
);
}

0 comments on commit 25b2ebd

Please sign in to comment.