feat: implement performance optimizations
- Add database indexes for frequently queried fields (listId, completed, priority, dueDate, createdAt) - Add compound indexes for common query patterns (listId+completed, listId+priority) - Implement pagination support in getItemsByFilter with configurable page size (default 50) - Optimize components with React.memo (ItemCard, ListCard, FilterPanel, SearchBar, SearchResults, EmptyState) - Configure Next.js for better bundle optimization: - Enable optimizePackageImports for lucide-react - Enable SWC minification - Remove console logs in production (except errors/warnings) - Optimize images with AVIF/WebP formats - Enable compression - Disable production source maps for smaller bundles - Loading states already implemented to prevent layout shift Task 18 complete - all performance optimizations implemented
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
|
||||
import { ReactNode } from 'react'
|
||||
import { memo, ReactNode } from 'react'
|
||||
import { Inbox, ListTodo, Search, Filter } from 'lucide-react'
|
||||
|
||||
interface EmptyStateProps {
|
||||
@@ -10,7 +10,7 @@ interface EmptyStateProps {
|
||||
action?: ReactNode
|
||||
}
|
||||
|
||||
export default function EmptyState({ icon = 'inbox', title, description, action }: EmptyStateProps) {
|
||||
function EmptyState({ icon = 'inbox', title, description, action }: EmptyStateProps) {
|
||||
const icons = {
|
||||
inbox: <Inbox size={48} className="text-gray-300" />,
|
||||
list: <ListTodo size={48} className="text-gray-300" />,
|
||||
@@ -39,3 +39,5 @@ export default function EmptyState({ icon = 'inbox', title, description, action
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default memo(EmptyState)
|
||||
|
||||
Reference in New Issue
Block a user