This repository was archived by the owner on Mar 6, 2025. It is now read-only.

Description
The error you're encountering is due to the way the redirect is being handled in the TransactionsPage component. In Next.js, you can't return a redirect object directly from a server component. Instead, you should use the redirect function from next/navigation. Let's modify the code to fix this issue:
file: app/transactions/page.tsx
// ... existing imports ...
import { redirect } from 'next/navigation';
// ... existing code ...
export default async function TransactionsPage({ params, searchParams }: { params: {}; searchParams: { page: string } }) {
// ... existing code ...
if (page > totalPages) {
// Redirect to the last valid page if the requested page is out of range
redirect(`/transactions?page=${totalPages}`);
}
// ... rest of the component code ...
}
// ... rest of the file ...