Skip to content

Conversation

@hanminh1203
Copy link
Collaborator

@hanminh1203 hanminh1203 commented Dec 20, 2025

Change Summary

Improved responsive design and refactored artwork pages to follow Next.js best practices. Centralized mock data generation into a reusable hook and added proper error handling for empty database states.

Changes Made

  • Refactored ButtonGallery component to use Next.js Link component properly
  • Added placeholder SVG icon for artworks without images
  • Centralized mock data generation in useArtworkData.ts hook
  • Added error handling in getServerSideProps to return mock data when API fails or DB is empty
  • Improved responsive layouts with proper spacing and mobile-first approach
  • Fixed TypeScript type issues with Next.js route parameters and PageResult types

Change Form

  • The pull request title has an issue number (Individual art pages #8)
  • The change works by "Smoke testing" or quick testing
  • The change has tests - NA: Mock data hook doesn't require unit tests at this stage
  • The change has documentation - NA: Changes are self-explanatory code refactoring

Other Information

  • Add module django_filters.rest_framework - need confirmation

Testing Notes:

  • Tested with empty database - placeholder icons display correctly
  • Tested navigation between gallery and individual artwork pages
  • Verified responsive layout on mobile and desktop viewports

Related issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Individual art pages

4 participants