Skip to content

Comments

"Shop Now" Button feature is updated.#78

Open
RuchaKatte wants to merge 3 commits intokris70lesgo:mainfrom
RuchaKatte:main
Open

"Shop Now" Button feature is updated.#78
RuchaKatte wants to merge 3 commits intokris70lesgo:mainfrom
RuchaKatte:main

Conversation

@RuchaKatte
Copy link

@RuchaKatte RuchaKatte commented Oct 21, 2025

User description

Description

Please provide a clear and concise description of what this pull request does.


Related Issue

Fixes # (issue number if applicable)
#34

Type of Change

  • 🐛 Bug fix
  • 🚀 New feature
  • 🧹 Code refactor
  • 📝 Documentation update
  • ✅ Test addition or update
  • ⚙️ Other (please describe):

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.


Screenshots (if applicable)

Add screenshots or recordings to help reviewers understand the change.


Additional Context

Add any other relevant information or context here.


PR Type

Enhancement


Description

  • Refactored "Shop Now" button with CSS module integration

  • Replaced MagicCard component with simplified div elements

  • Added hover underline animation and SVG arrow animations

  • Removed hero section, stats section, and footer components

  • Simplified loading state management with mounted flag


Diagram Walkthrough

flowchart LR
  A["Dashboard Page"] --> B["CSS Module Integration"]
  A --> C["Remove MagicCard Component"]
  A --> D["Simplify Layout"]
  B --> E["uiverseButton.module.css"]
  C --> F["Replace with div elements"]
  D --> G["Remove Hero/Stats/Footer"]
  E --> H["CTA Button Styles"]
  H --> I["Hover Animations"]
Loading

File Walkthrough

Relevant files
Enhancement
uiverseButton.module.css
New CSS module for button animations                                         

src/app/dashboard/uiverseButton.module.css

  • New CSS module file with button styling and animations
  • Base CTA button styles with flexbox layout
  • SVG transform animations on hover and active states
  • Hover underline animation using pseudo-elements
  • Text styling with letter-spacing and uppercase transform
+60/-0   
page.tsx
Simplify dashboard and integrate button CSS module             

src/app/dashboard/page.tsx

  • Removed MagicCard component and replaced with simple div elements
  • Integrated CSS module for button styling
  • Simplified loading state with mounted flag and useEffect
  • Removed hero section, stats section, and footer
  • Updated button to use CSS module classes with hover underline
    animation
  • Removed unnecessary imports and simplified component structure
  • Changed button text from "Shop Now" to "Shop now" and "Try Now" to
    "Try now"
+42/-244

@vercel
Copy link

vercel bot commented Oct 21, 2025

@RuchaKatte is attempting to deploy a commit to the agastya's projects Team on Vercel.

A member of the Team first needs to authorize it.

@qodo-free-for-open-source-projects

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🟡
🎫 #34
🟢 Implement hover underline animation and arrow movement consistent with the Uiverse
example.
Integrate the new button styling into the dashboard using appropriate styling approach.
Ensure the updated button text and behavior fit the dashboard UI.
🔴 Replace existing "Add to cart" (shop) button on the dashboard with the referenced Uiverse
design style.
Visual parity with the referenced design (colors, spacing, uppercase text).
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-free-for-open-source-projects

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
PR scope exceeds the ticket's request

The PR should be revised to only include the button UI update, as it currently
removes major page components like the hero, stats, and footer sections, which
is outside the scope of the original request.

Examples:

src/app/dashboard/page.tsx [93-217]
  return (
    <div className="min-h-screen bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 text-white overflow-y-auto">
      <AnimatePresence>{isLoading && <AcademicHubSkeleton />}</AnimatePresence>

      <div
        className={
          isLoading ? "opacity-0" : "opacity-100 transition-opacity duration-500"
        }
      >
        <NavbarDemo />

 ... (clipped 115 lines)

Solution Walkthrough:

Before:

const AcademicHub = () => {
  // ...
  return (
    <div className="min-h-screen ...">
      <NavbarDemo />

      {/* Hero Section */}
      <section className="relative py-20 ...">
        {/* ... hero content ... */}
      </section>

      {/* Featured Projects */}
      <section className="py-16 ...">
        {/* ... project cards using MagicCard ... */}
      </section>

      {/* Stats Section */}
      <section className="py-16 ...">
        {/* ... stats content ... */}
      </section>

      {/* Footer */}
      <footer className="bg-slate-900/80 ...">
        {/* ... footer content ... */}
      </footer>
    </div>
  );
};

After:

const AcademicHub = () => {
  // ...
  return (
    <div className="min-h-screen ...">
      <NavbarDemo />

      {/* Featured Projects */}
      <section className="py-16 ...">
        {/* ... simplified project cards with new button ... */}
      </section>
    </div>
  );
};
Suggestion importance[1-10]: 10

__

Why: The suggestion correctly identifies that the PR introduces massive, undocumented breaking changes by removing the hero, stats, and footer sections, which is far beyond the ticket's scope.

High
Possible issue
Fix incorrect underline animation position

Adjust the bottom property of the .hoverUnderlineAnimation::after pseudo-element
to correctly position the underline closer to the text.

src/app/dashboard/uiverseButton.module.css [38-55]

 .hoverUnderlineAnimation {
   position: relative;
   color: white;
   padding-bottom: 20px;
 }
 
 .hoverUnderlineAnimation::after {
   content: "";
   position: absolute;
   width: 100%;
   transform: scaleX(0);
   height: 2px;
-  bottom: 0;
+  bottom: 12px;
   left: 0;
   background-color: white;
   transform-origin: bottom right;
   transition: transform 0.25s ease-out;
 }
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies a likely visual bug where the underline animation is positioned too far from the text due to conflicting padding and positioning values, and it proposes a reasonable fix.

Medium
Remove duplicate data from array

Remove the duplicate "Support" entry from the stats array to improve code
quality.

src/app/dashboard/page.tsx [83-89]

 const stats = [
   { number: "0%", label: "Plagiarism" },
   { number: "5K+", label: "Projects Delivered" },
   { number: "98%", label: "Success Rate" },
   { number: "24/7", label: "Support" },
-  { number: "24/7", label: "Support" },
 ];

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 3

__

Why: The suggestion correctly identifies a duplicate entry in the stats array that was added in this PR, and removing it improves code cleanliness.

Low
General
Refactor conditional logic for scalability

Refactor the onClick handler's if-else if chain into a more scalable and
readable map-based lookup for project routes.

src/app/dashboard/page.tsx [181-192]

 <button
   className={styles.cta}
   onClick={() => {
-    if (project.id === 1)
-      router.push("/form?noOfPage=10&totalAmount=100");
-    else if (project.id === 2)
-      router.push("/form?noOfPage=24&totalAmount=250");
-    else if (project.id === 3)
-      router.push("/form?noOfPage=8&totalAmount=50");
-    else if (project.id === 4) router.push("/ai-generator");
+    const projectRoutes = {
+      1: "/form?noOfPage=10&totalAmount=100",
+      2: "/form?noOfPage=24&totalAmount=250",
+      3: "/form?noOfPage=8&totalAmount=50",
+      4: "/ai-generator",
+    };
+    const route = projectRoutes[project.id as keyof typeof projectRoutes];
+    if (route) {
+      router.push(route);
+    }
   }}
 >
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion offers a valid refactoring of an if-else chain to a map lookup, which improves code readability and maintainability, especially if more project routes are added in the future.

Low
  • More

@kris70lesgo
Copy link
Owner

@RuchaKatte i have added the labels thank u for contributing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants