-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
The total count is just too much for the db. We have to remove it and resort to dumber pagination in favour of better performance.
- Loading branch information
Showing
7 changed files
with
107 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 0 additions & 82 deletions
82
.../[documentUuid]/evaluation-results-by-document-content/[evaluationId]/pagination/route.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
apps/web/src/components/TablePaginationFooter/TablePaginationFooterWithoutCount.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
'use client' | ||
|
||
import { Button, Text } from '@latitude-data/web-ui' | ||
|
||
export function LogicTablePaginationFooterWithoutCount({ | ||
page, | ||
onPageChange, | ||
nextPage = false, | ||
}: { | ||
page: number | ||
onPageChange: (page: number) => void | ||
nextPage?: boolean | ||
}) { | ||
return ( | ||
<div className='w-full flex justify-between items-center'> | ||
<div /> | ||
<div className='flex items-center'> | ||
<Button | ||
size='default' | ||
variant='ghost' | ||
disabled={page <= 1} | ||
iconProps={{ | ||
name: 'chevronLeft', | ||
}} | ||
onClick={() => onPageChange(page - 1)} | ||
/> | ||
<div className='flex flex-row items-center gap-x-1'> | ||
<Text.H5M color='foregroundMuted'>{page}</Text.H5M> | ||
</div> | ||
<Button | ||
size='default' | ||
variant='ghost' | ||
disabled={!nextPage} | ||
iconProps={{ | ||
name: 'chevronRight', | ||
}} | ||
onClick={() => onPageChange(page + 1)} | ||
/> | ||
</div> | ||
</div> | ||
) | ||
} |
58 changes: 0 additions & 58 deletions
58
apps/web/src/stores/useEvaluationResultsByDocumentCount.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.