Issue 15 create sponsors & guests page - #38
Conversation
1. Add Sponsor component 2. Add index.ts to export it
…ith backend placeholder - Modified SponsorSection component to use Montserrat font for consistent typography - Added SponsorSection to SponsorsAndGuest page, passing partners state - Implemented useEffect hook in SponsorsAndGuest to asynchronously fetch partners data from /api/partners - Added loading state to handle asynchronous data fetching UX - Prepared page for future backend integration, ensuring seamless sponsor data flow - Improved component structure and styling for better maintainability and UI consistency
Updated .gitignore to exclude /server/media and /server/static_files directories from version control.
Changed the fetch URL for partners data from a relative path to 'http://localhost:8000/api/partners' to ensure correct API endpoint is used during local development.
Introduces the GuestSection component to display special guests, updates the SponsorsGuests index to export both SponsorSection and GuestSection, and modifies the sponsorsGuests page to support and render guest data alongside sponsors.
Combined data fetching for partners and guests using Promise.all and refactored the UI to use the GuestSection component for displaying guests. This improves maintainability and enables dynamic rendering of guest data from the backend.
Changed API endpoints in sponsorsGuests.tsx to use new sponsor routes. Allowed localhost and 127.0.0.1 domains for Next.js image optimization. Added 'relative' class to guest image container for improved styling.
The guest link is now rendered in its own paragraph below the description for improved clarity and separation in the GuestSection component.
…ors_&_Guests_page
There was a problem hiding this comment.
Pretty good but I have some comments peppered throughout the files.
A common theme I noticed in every file is that you're importing fonts individually. A good rule of thumb is if you find that your repeating yourself frequently, there's usually a good way to minimise that. You can actually import a font into tailwind itself and just use it as a class name. i.e. instead of constantly adding
import { Montserrat } from "next/font/google";
const montserrat = Montserrat({
subsets: ["latin"],
weight: ["400", "600", "700"],
});
You can actually just import it once into tailwind and use it as a class.
Reference: https://tailwindcss.com/docs/font-family#customizing-your-theme
Another thing is the custom classes.
Feel free to let me know your thoughts :)
|
@junhyap - PR Feedback should be actioned, please review again |
|
@junhyap - I'm merging, but if you have more feedback, let me know and I'll raise another PR |
Change Summary
This pull request introduces a new "Sponsors and Guests" feature for the client application. It includes components for displaying special guests and sponsors, a dedicated page for this feature, and updates to the configuration to support image domains. The most important changes focus on implementing reusable components, fetching data dynamically, and ensuring compatibility with the development environment.
Change Form
Fill this up (NA if not available). If a certain criteria is not met, can you please give a reason.
Other Information
[Is there anything in particular in the review that I should be aware of?]
Resolves #15
Related issue