Skip to content

Feat 1074/refont of reward section add new image#1189

Merged
Marchand-Nicolas merged 5 commits into
lfglabs-dev:testnetfrom
luighis:feat-1074/refont-of-reward-section-add-new-image
Jul 7, 2025
Merged

Feat 1074/refont of reward section add new image#1189
Marchand-Nicolas merged 5 commits into
lfglabs-dev:testnetfrom
luighis:feat-1074/refont-of-reward-section-add-new-image

Conversation

@luighis
Copy link
Copy Markdown
Contributor

@luighis luighis commented Jul 3, 2025

📐 Features
✅ An image was added to the Stats component, according to the figma design.
✅ The image was optimized (compressed), reducing its weight, this makes the page load faster, improving the user experience
✅ Image, responsive on desktop, tablet, and mobile

Close: #1074

Captura de pantalla 2025-07-03 a la(s) 4 38 04 p  m

Captura de pantalla 2025-07-03 a la(s) 4 37 46 p  m

Summary by CodeRabbit

  • New Features

    • Added a static image display alongside the statistics section.
  • Style

    • Enhanced the layout of the statistics section with responsive flexbox and improved spacing for better visual arrangement.
    • Updated the statistics layout to use flexible, responsive stacking and spacing for improved display on various screen sizes.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 3, 2025

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

Name Status Preview Comments Updated (UTC)
starknet-quest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2025 7:59pm

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 3, 2025

@luighis is attempting to deploy a commit to the LFG Labs Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 3, 2025

"""

Walkthrough

The Stats component container was updated to use Tailwind CSS utility classes for responsive layout. The app/quests/page.tsx now wraps CategoryTitle and Stats in a flex container and adds a new /tokens.webp image to the right of the rewards section using Next.js Image. No exported or public entity signatures were changed.

Changes

File(s) Change Summary
components/UI/stats/stats.tsx Replaced CSS module container with Tailwind CSS classes for responsive flex layout and spacing.
app/quests/page.tsx Wrapped CategoryTitle and Stats in a flex container; added Next.js Image of /tokens.webp.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant PageComponent
    participant StatsComponent
    participant NextImage

    User->>PageComponent: Render rewards section
    PageComponent->>StatsComponent: Render CategoryTitle and Stats inside flex container
    PageComponent->>NextImage: Render /tokens.webp image to the right
Loading

Assessment against linked issues

Objective Addressed Explanation
Add a new image to the right of the rewards section (#1074)
Ensure image placement aligns with the design specifications (#1074)
Verify image is displayed correctly and does not affect other elements (#1074)
Confirm all changes align with the Figma design (#1074)

Suggested reviewers

  • Marchand-Nicolas
    """

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @typescript-eslint/eslint-plugin@5.62.0
npm error Found: eslint@9.30.0
npm error node_modules/eslint
npm error dev eslint@"^9.11.1" from the root project
npm error peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0" from @eslint-community/eslint-utils@4.7.0
npm error node_modules/@eslint-community/eslint-utils
npm error @eslint-community/eslint-utils@"^4.2.0" from @typescript-eslint/utils@5.62.0
npm error node_modules/@typescript-eslint/utils
npm error @typescript-eslint/utils@"5.62.0" from @typescript-eslint/eslint-plugin@5.62.0
npm error node_modules/@typescript-eslint/eslint-plugin
npm error dev @typescript-eslint/eslint-plugin@"^5.47.0" from the root project
npm error 1 more (eslint-config-next)
npm error 1 more (@typescript-eslint/type-utils)
npm error @eslint-community/eslint-utils@"^4.2.0" from eslint@9.30.0
npm error 5 more (@typescript-e

... [truncated 730 characters] ...

error node_modules/@typescript-eslint/eslint-plugin
npm error dev @typescript-eslint/eslint-plugin@"^5.47.0" from the root project
npm error @typescript-eslint/eslint-plugin@"^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0" from eslint-config-next@14.2.30
npm error node_modules/eslint-config-next
npm error dev eslint-config-next@"^14.0.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /.npm/_logs/2025-07-07T19_58_37_404Z-eresolve-report.txt
npm error A complete log of this run can be found in: /.npm/_logs/2025-07-07T19_58_37_404Z-debug-0.log


📜 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 b10fabf and 03f4def.

📒 Files selected for processing (1)
  • app/quests/page.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/quests/page.tsx
✨ 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.

@luighis
Copy link
Copy Markdown
Contributor Author

luighis commented Jul 3, 2025

Hi @Kevils @Marchand-Nicolas , check the PR, please.
Any questions, let me know, I'll be happy to answer you.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 020e1d1 and 43492ec.

⛔ Files ignored due to path filters (1)
  • public/tokens.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • components/UI/stats/stats.tsx (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: joeperpetua
PR: lfglabs-dev/starknet.quest#870
File: components/discover/tokenIcon.tsx:19-29
Timestamp: 2024-10-11T11:08:32.705Z
Learning: In the `TokenIcon` component (`components/discover/tokenIcon.tsx`), when an unknown token is encountered, default to using the USDC icon, consistent with the implementation in `TokenSymbol` (`components/quest-boost/TokenSymbol.tsx`).
Learnt from: baitcode
PR: lfglabs-dev/starknet.quest#962
File: app/page.tsx:34-34
Timestamp: 2024-11-27T07:42:52.459Z
Learning: In this project, updating the Card component to use Next.js Image component is considered out of scope.
Learnt from: fricoben
PR: lfglabs-dev/starknet.quest#963
File: components/discover/defiTable.tsx:322-325
Timestamp: 2024-11-26T01:48:15.315Z
Learning: Utility functions like `getTokenIcon` should be placed in `utils/defi.ts` for better code reuse and maintainability.
components/UI/stats/stats.tsx (3)
Learnt from: baitcode
PR: lfglabs-dev/starknet.quest#962
File: app/page.tsx:34-34
Timestamp: 2024-11-27T07:42:52.459Z
Learning: In this project, updating the Card component to use Next.js Image component is considered out of scope.
Learnt from: baitcode
PR: lfglabs-dev/starknet.quest#962
File: components/pages/home/splitTitle.tsx:3-3
Timestamp: 2024-11-27T07:26:15.265Z
Learning: In the file `components/pages/home/splitTitle.tsx`, the `motion` library is correctly imported from `motion/react` rather than `framer-motion`.
Learnt from: joeperpetua
PR: lfglabs-dev/starknet.quest#870
File: components/discover/tokenIcon.tsx:19-29
Timestamp: 2024-10-11T11:08:32.705Z
Learning: In the `TokenIcon` component (`components/discover/tokenIcon.tsx`), when an unknown token is encountered, default to using the USDC icon, consistent with the implementation in `TokenSymbol` (`components/quest-boost/TokenSymbol.tsx`).
🔇 Additional comments (2)
components/UI/stats/stats.tsx (2)

6-6: LGTM! Next.js Image import added correctly.

The import is necessary for the new Image component and follows Next.js best practices for image optimization.


20-20: Good responsive layout implementation.

The Tailwind utility classes provide a clean, responsive flexbox layout that adapts to different screen sizes with appropriate spacing.

Comment thread components/UI/stats/stats.tsx Outdated
Copy link
Copy Markdown
Collaborator

@Marchand-Nicolas Marchand-Nicolas left a comment

Choose a reason for hiding this comment

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

Can you convert the image to web please ? https://image.online-convert.com/convert/png-to-webp

Also please center it vertically inside the block
Screenshot 2025-07-07 at 06 08 57

@Marchand-Nicolas Marchand-Nicolas added the ❌ Change request Change requested from reviewer label Jul 7, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 43492ec and b10fabf.

📒 Files selected for processing (2)
  • app/quests/page.tsx (2 hunks)
  • components/UI/stats/stats.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/UI/stats/stats.tsx
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: baitcode
PR: lfglabs-dev/starknet.quest#962
File: app/page.tsx:34-34
Timestamp: 2024-11-27T07:42:52.459Z
Learning: In this project, updating the Card component to use Next.js Image component is considered out of scope.
Learnt from: joeperpetua
PR: lfglabs-dev/starknet.quest#870
File: components/discover/tokenIcon.tsx:19-29
Timestamp: 2024-10-11T11:08:32.705Z
Learning: In the `TokenIcon` component (`components/discover/tokenIcon.tsx`), when an unknown token is encountered, default to using the USDC icon, consistent with the implementation in `TokenSymbol` (`components/quest-boost/TokenSymbol.tsx`).
Learnt from: baitcode
PR: lfglabs-dev/starknet.quest#962
File: components/pages/home/splitTitle.tsx:3-3
Timestamp: 2024-11-27T07:26:15.265Z
Learning: In the file `components/pages/home/splitTitle.tsx`, the `motion` library is correctly imported from `motion/react` rather than `framer-motion`.
Learnt from: fricoben
PR: lfglabs-dev/starknet.quest#963
File: components/discover/defiTable.tsx:322-325
Timestamp: 2024-11-26T01:48:15.315Z
Learning: Utility functions like `getTokenIcon` should be placed in `utils/defi.ts` for better code reuse and maintainability.
Learnt from: baitcode
PR: lfglabs-dev/starknet.quest#962
File: components/pages/home/splitTitle.tsx:373-392
Timestamp: 2024-11-27T07:25:07.612Z
Learning: In the `SplitTitle` component (`components/pages/home/splitTitle.tsx`), the use of `Math.random()` in the `getVariants` function is intentional to create unpredictable animations.
app/quests/page.tsx (5)
Learnt from: baitcode
PR: lfglabs-dev/starknet.quest#962
File: app/page.tsx:34-34
Timestamp: 2024-11-27T07:42:52.459Z
Learning: In this project, updating the Card component to use Next.js Image component is considered out of scope.
Learnt from: baitcode
PR: lfglabs-dev/starknet.quest#962
File: components/pages/home/splitTitle.tsx:3-3
Timestamp: 2024-11-27T07:26:15.265Z
Learning: In the file `components/pages/home/splitTitle.tsx`, the `motion` library is correctly imported from `motion/react` rather than `framer-motion`.
Learnt from: baitcode
PR: lfglabs-dev/starknet.quest#962
File: components/pages/home/splitTitle.tsx:373-392
Timestamp: 2024-11-27T07:25:07.612Z
Learning: In the `SplitTitle` component (`components/pages/home/splitTitle.tsx`), the use of `Math.random()` in the `getVariants` function is intentional to create unpredictable animations.
Learnt from: joeperpetua
PR: lfglabs-dev/starknet.quest#870
File: components/discover/tokenIcon.tsx:19-29
Timestamp: 2024-10-11T11:08:32.705Z
Learning: In the `TokenIcon` component (`components/discover/tokenIcon.tsx`), when an unknown token is encountered, default to using the USDC icon, consistent with the implementation in `TokenSymbol` (`components/quest-boost/TokenSymbol.tsx`).
Learnt from: fricoben
PR: lfglabs-dev/starknet.quest#963
File: components/discover/defiTable.tsx:418-456
Timestamp: 2024-11-25T01:01:20.940Z
Learning: When displaying opportunity cards in the `DataTable` component (`components/discover/defiTable.tsx`), ensure that data is rendered dynamically based on the current filters and sorting applied, avoiding hardcoded values.
🔇 Additional comments (1)
app/quests/page.tsx (1)

12-12: LGTM: Proper Next.js Image import.

The import statement follows Next.js conventions and is correctly positioned with other imports.

Comment thread app/quests/page.tsx
@luighis
Copy link
Copy Markdown
Contributor Author

luighis commented Jul 7, 2025

@Marchand-Nicolas the change is ready.

Captura de pantalla 2025-07-07 a la(s) 4 52 00 p  m

Copy link
Copy Markdown
Collaborator

@Marchand-Nicolas Marchand-Nicolas left a comment

Choose a reason for hiding this comment

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

Very good job, it's perfect!
Lgtm :)

@Marchand-Nicolas Marchand-Nicolas merged commit e062d18 into lfglabs-dev:testnet Jul 7, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

❌ Change request Change requested from reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refont of reward section - Add new image

2 participants