Skip to content

Switching images to use Amazon instead#698

Open
shashilo wants to merge 2 commits intodevelopfrom
slo/images-using-amazonapi
Open

Switching images to use Amazon instead#698
shashilo wants to merge 2 commits intodevelopfrom
slo/images-using-amazonapi

Conversation

@shashilo
Copy link
Copy Markdown
Collaborator

Description

Before:

Describe previous behavior

After:

Describe new behavior, including what was changed and why

Closes #[ticketnumber]

Testing instructions

If applicable, provide steps for reviewers to test changes locally -- including necessary setup, commands, and expected results

Additional information

Share any additional info that may provide context for the PR evaluation (performance considerations, design choices, etc)

[optional] Screenshots

Pre-submission checklist

  • Code builds and passes locally
  • PR title follows Conventional Commit format (e.g. test #001: created unit test for __ component)
  • Request reviews from the Peer Code Reviewers and Senior+ Code Reviewers groups
  • Thread has been created in Discord and PR is linked in gis-code-questions

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
elecretanta Ready Ready Preview Comment Nov 19, 2025 9:27pm
elecretanta-storybook Ready Ready Preview Comment Nov 19, 2025 9:27pm
elecretanta-unit-test Error Error Nov 19, 2025 9:27pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 19, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch slo/images-using-amazonapi

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread lib/getAmazonImage.ts
): Promise<{ imageUrl: string | null; productUrl: string | null }> => {
const affiliateTag = process.env.NEXT_PUBLIC_AMAZON_AFFILIATE_TAG;
const encodedSearch = encodeURIComponent(title).replace(/%20/g, '+');
const productUrl = `https://www.amazon.com/s?k=${encodedSearch}${affiliateTag ? `&tag=${affiliateTag}` : ''}`;
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.

title is just the name of a gift to be searched. This just uses title as if it's a product id with the goal of creating an Amazon product page. But by using /s?k= it just creates a search page instead.

Comment thread lib/getAmazonImage.ts
const affiliateTag = process.env.NEXT_PUBLIC_AMAZON_AFFILIATE_TAG;
const encodedSearch = encodeURIComponent(title).replace(/%20/g, '+');
const productUrl = `https://www.amazon.com/s?k=${encodedSearch}${affiliateTag ? `&tag=${affiliateTag}` : ''}`;
return { imageUrl: null, productUrl };
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.

imageUrl will always be null here.

Base automatically changed from slo/improving-suggestion-api-performance to develop November 21, 2025 14:28
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