Skip to content

fix: revert redirect to peanut.me#846

Merged
Hugo0 merged 2 commits intomainfrom
fix/revert-redirect
May 13, 2025
Merged

fix: revert redirect to peanut.me#846
Hugo0 merged 2 commits intomainfrom
fix/revert-redirect

Conversation

@kushagrasarathe
Copy link
Copy Markdown
Contributor

@kushagrasarathe kushagrasarathe commented May 13, 2025

  • fixes TASK-11300
  • also fixes TASK-11299

Summary by CodeRabbit

  • New Features
    • Added a "TRY NEW VERSION" card linking to an external site, highlighted with a star icon.
    • Introduced dynamic background styling for the layout based on the current route.
  • Improvements
    • Updated the "Send" menu and card titles to "Send (legacy)" for clarity.
    • Enhanced card visuals with consistent black borders and improved icon padding for emphasis.
  • Removals
    • Removed the "Request" card and its corresponding menu link.
    • Deleted several permanent redirects to external URLs.
  • Style
    • Expanded background color options for improved theming.

@vercel
Copy link
Copy Markdown

vercel bot commented May 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
peanut-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2025 3:03pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented May 13, 2025

Walkthrough

This update removes several permanent redirects from the Next.js configuration, introduces a new icon export, modifies menu and card titles to indicate legacy status, removes certain navigation options, and updates the TryNow component to feature an external link to a new version. Tailwind configuration is extended to support a background color variant, and dynamic background styling is added to the layout based on the current route.

Changes

File(s) Change Summary
next.config.js Removed permanent redirects for /, /claim, and /request/create to https://peanut.me URLs.
src/assets/icons/index.ts Added export for STAR_OUTLINE_ICON pointing to star-outline.svg.
src/components/Global/Header/index.tsx Reordered imports. Changed /send menu title to "Send (legacy)". Removed /request/create menu link.
src/components/Global/Layout/index.tsx Reordered and expanded imports. Added dynamic background styling using twMerge and usePathname to set a different background for /pay route. No changes to exported component signatures.
src/components/Global/TryNow/index.tsx Added "TRY NEW VERSION" card linking externally with star icon and isExternal property. Changed "Send" card title to "Send (legacy)". Removed "Request" card. Added conditional external link attributes and black border styling. Modified icon padding for first card. Updated card grid layout for new card arrangement.
tailwind.config.js Changed background color in theme from a single value to an object with DEFAULT and 1 keys, enabling background and background-1 utilities.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Header
    participant TryNow
    participant Layout

    User->>Header: Views menu links
    Header-->>User: Shows "Send (legacy)" (no "Request")
    User->>TryNow: Views TryNow cards
    TryNow-->>User: Shows "TRY NEW VERSION" (external), "Send (legacy)"
    User->>Layout: Navigates to /pay
    Layout->>Layout: Applies bg-background-1 style
Loading

Possibly related PRs

Suggested reviewers

  • Hugo0

Poem

A hop and a skip, the old links are gone,
The stars now shine on a version new-dawn.
"Send (legacy)" whispers of journeys before,
While backgrounds shift and icons soar.
With a border of black and a path to explore,
This rabbit approves—let’s code evermore! 🐇✨

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 76d62e3 and 22677de.

⛔ Files ignored due to path filters (1)
  • src/assets/icons/star-outline.svg is excluded by !**/*.svg
📒 Files selected for processing (6)
  • next.config.js (0 hunks)
  • src/assets/icons/index.ts (1 hunks)
  • src/components/Global/Header/index.tsx (2 hunks)
  • src/components/Global/Layout/index.tsx (3 hunks)
  • src/components/Global/TryNow/index.tsx (4 hunks)
  • tailwind.config.js (1 hunks)
💤 Files with no reviewable changes (1)
  • next.config.js
🔇 Additional comments (17)
src/assets/icons/index.ts (1)

15-15: New icon export added correctly

The new STAR_OUTLINE_ICON export has been properly added and follows the existing export pattern.

tailwind.config.js (1)

59-62: Color configuration enhancement looks good

Good refactoring of the background color to support multiple variants. This change now allows for using both bg-background (default) and bg-background-1 classes in the application, enabling more flexible styling options.

src/components/Global/Header/index.tsx (4)

2-6: Import reordering

The import statements have been reordered but functionally remain the same.


7-8: Import reordering continued

Further reordering of imports with no functional changes.

Also applies to: 12-13


237-237: Updated menu title to indicate legacy status

The 'Send' menu title has been updated to 'Send (legacy)', which clearly indicates to users that this is a legacy feature. This aligns with the PR objective of redirecting users to the new peanut.me version.


237-240: Removed request creation menu link

The menu link to '/request/create' with title 'request' has been removed. This removal is consistent with the PR objective of reverting redirects to peanut.me.

src/components/Global/Layout/index.tsx (3)

4-11: Import organization and additions

Imports have been reordered and new imports have been added for usePathname, twMerge, Widget, and useFooterVisibility. These changes support the new functionality for dynamic background styling.


28-30: Path tracking for conditional styling

Added path tracking using usePathname() and created a flag to identify when the user is on the '/pay' route. This is good for conditionally applying styles based on the current route.


44-44: Dynamic background styling based on route

The container now conditionally applies bg-background-1 when on the '/pay' route, utilizing the new background color variant from the Tailwind config. This provides visual differentiation for the payment flow, which is appropriate for the user experience.

src/components/Global/TryNow/index.tsx (8)

1-1: Library import updated correctly.

The addition of the STAR_OUTLINE_ICON import is properly aligned with its usage in the new card entry below.


12-12: Interface extension is appropriate.

Good addition of the optional isExternal boolean property to support secure external linking.


16-22: New card entry properly configured.

The new "TRY NEW VERSION" card is well structured with appropriate external link settings and descriptive content. The card correctly uses the imported icon and points to the new peanut.me domain.


30-30: Card title updated to indicate legacy status.

Properly renamed to "Send (legacy)" to indicate this is the older functionality, consistent with the changes mentioned in the PR objectives.


45-46: Secure external link handling implemented.

Good implementation of secure external link handling with proper target and rel attributes when isExternal is true.


47-50: Card styling enhanced with border.

The addition of the black border to all cards improves visual definition.


59-64: Desktop icon container with conditional padding.

Well-implemented conditional styling that gives more emphasis to the first card's icon.


68-73: Mobile icon container with consistent conditional padding.

The mobile view correctly mirrors the desktop padding logic for visual consistency across viewports.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@notion-workspace
Copy link
Copy Markdown

@notion-workspace
Copy link
Copy Markdown

@Hugo0 Hugo0 merged commit c199294 into main May 13, 2025
4 checks passed
@Hugo0 Hugo0 deleted the fix/revert-redirect branch July 3, 2025 18:25
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