Create reusable merch components#228
Open
olivia2450 wants to merge 1 commit into
Open
Conversation
… to change the images.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces initial infrastructure for a Merchandise page by adding a CMS global for merch content, wiring up cache revalidation for that global, and adding a reusable frontend MerchItemCard component with placeholder usage on the merch page.
Changes:
- Added a new
merchGlobalcache tag and relations entry for Next.js tag revalidation. - Created a new Payload
MerchGlobalconfig to manage merch items (heading/body/image/variant/callouts). - Added a reusable
MerchItemCardcomponent and updated/merchandiseto render placeholder merch cards.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 13 comments.
| File | Description |
|---|---|
src/lib/utils/revalidation.ts |
Adds merchGlobal to cache tag relations and cacheTags for revalidation. |
src/globals/merch-global.ts |
Introduces a new Payload global for Merch page content and hooks it into cache revalidation. |
src/app/(frontend)/merchandise/page.tsx |
Renders placeholder merch sections using the new reusable card component. |
src/app/(frontend)/merchandise/_components/MerchItemCard.tsx |
Adds a new reusable merch card component supporting multiple layout variants. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+4
to
+6
| import { anyone } from './_access/anyone' | ||
| import { authenticated } from './_access/authenticated' | ||
| import { customUploadField } from './_fields/custom-upload' |
Comment on lines
+58
to
+62
| {body && ( | ||
| <div className="text-sm text-gray-700 italic"> | ||
| {body as React.ReactNode} | ||
| </div> | ||
| )} |
Comment on lines
+21
to
+23
| body={ | ||
| "If you're interested contact our media officers at social@aucc.org.nz for details." as any | ||
| } |
Comment on lines
+4
to
+6
| import { anyone } from './_access/anyone' | ||
| import { authenticated } from './_access/authenticated' | ||
| import { customUploadField } from './_fields/custom-upload' |
Comment on lines
+4
to
+6
| import { anyone } from './_access/anyone' | ||
| import { authenticated } from './_access/authenticated' | ||
| import { customUploadField } from './_fields/custom-upload' |
Comment on lines
+58
to
+62
| {body && ( | ||
| <div className="text-sm text-gray-700 italic"> | ||
| {body as React.ReactNode} | ||
| </div> | ||
| )} |
Comment on lines
+21
to
+23
| body={ | ||
| "If you're interested contact our media officers at social@aucc.org.nz for details." as any | ||
| } |
Comment on lines
+20
to
+27
| export function MerchItemCard({ | ||
| heading, | ||
| body, | ||
| imageSrc, | ||
| imageAlt = '', | ||
| variant, | ||
| calloutLabels = [], | ||
| className, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🌟 Context
Create reusable merch components/boxes
📝 Description
Created 3 merch components with placeholder images attached
📋 Notes
Images might need to be changed