Fix Next.js 15 compatibility and TypeScript errors

- Update API route handlers to use async params for Next.js 15 compatibility
- Fix MUI DataGrid deprecated props (pageSize -> initialState.pagination)
- Replace Material-UI Grid components with Box for better compatibility
- Fix admin authentication system with proper request parameters
- Update permission constants to match available AdminPermission enum values
- Add missing properties to Page interface for type safety
- Update .gitignore to exclude venv/, import logs, and large data directories
- Optimize Next.js config to reduce memory usage during builds

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-24 09:54:13 +00:00
parent b0dd6c1a4b
commit 4303e48fac
25 changed files with 269 additions and 91 deletions

View File

@@ -40,6 +40,8 @@ interface Page {
id: string;
title: string;
slug: string;
content: string;
contentType: 'RICH_TEXT' | 'HTML' | 'MARKDOWN';
status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
showInNavigation: boolean;
showInFooter: boolean;
@@ -319,8 +321,13 @@ export default function PagesManagement() {
columns={columns}
loading={loading}
autoHeight
pageSize={25}
disableSelectionOnClick
initialState={{
pagination: {
paginationModel: { pageSize: 25, page: 0 }
}
}}
pageSizeOptions={[25, 50, 100]}
disableRowSelectionOnClick
sx={{
'& .MuiDataGrid-cell': {
borderBottom: '1px solid #f0f0f0'