Skip to content

Create reusable merch components#228

Open
olivia2450 wants to merge 1 commit into
mainfrom
olivia-create-reusablemerchcomponent
Open

Create reusable merch components#228
olivia2450 wants to merge 1 commit into
mainfrom
olivia-create-reusablemerchcomponent

Conversation

@olivia2450

Copy link
Copy Markdown
Contributor

🌟 Context

Create reusable merch components/boxes


📝 Description

Created 3 merch components with placeholder images attached


📋 Notes

Images might need to be changed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 merchGlobal cache tag and relations entry for Next.js tag revalidation.
  • Created a new Payload MerchGlobal config to manage merch items (heading/body/image/variant/callouts).
  • Added a reusable MerchItemCard component and updated /merchandise to 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 thread src/app/(frontend)/merchandise/_components/MerchItemCard.tsx
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 thread src/app/(frontend)/merchandise/_components/MerchItemCard.tsx
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,
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.

2 participants