Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/slugs/deps/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function Deps({ manifest, version }: PageProps) {
dataSource={dependencies}
rowKey={'package'}
columns={columns}
pagination={{ size: 'small' }}
pagination={{ size: 'small', pageSize: 50 }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The pagination configuration {{ size: 'small', pageSize: 50 }} is duplicated for the dependencies, devDependencies, and optionalDependencies tables. This use of a 'magic number' and repeated code can make future updates more difficult and error-prone.

To improve maintainability and adhere to the DRY (Don't Repeat Yourself) principle, I recommend extracting this configuration into a constant. You can define it once and reuse it for all three tables.

For example, you could add this inside your component:

const paginationConfig = { size: 'small' as const, pageSize: 50 };

And then apply it to each table like this:

<Table
  // ... other props
  pagination={paginationConfig}
/>

This would make the code cleaner and easier to update in the future.

Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider extracting the pagination configuration to a constant to avoid repetition across all three tables. This would make future changes easier to maintain. For example, you could define const PAGINATION_CONFIG = { size: 'small' as const, pageSize: 50 } at the module level and reuse it for all three Table components.

Copilot uses AI. Check for mistakes.
/>
</Card>
</Col>
Expand All @@ -75,7 +75,7 @@ export default function Deps({ manifest, version }: PageProps) {
dataSource={devDependencies}
columns={columns}
rowKey={'package'}
pagination={{ size: 'small' }}
pagination={{ size: 'small', pageSize: 50 }}
/>
</Card>
</Col>
Expand All @@ -85,7 +85,7 @@ export default function Deps({ manifest, version }: PageProps) {
dataSource={optionalDependencies}
columns={columns}
rowKey={'package'}
pagination={{ size: 'small' }}
pagination={{ size: 'small', pageSize: 50 }}
/>
</Card>
</Col>
Expand Down