Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Add more testimonials button in course pages #773

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

Susmita-Dey
Copy link
Contributor

@Susmita-Dey Susmita-Dey commented Sep 2, 2023

Fixes Issue

This PR fixes the following issues:

closes #issue-number

Changes proposed

Here comes all the changes proposed through this PR

Check List (Check all the boxes which are applicable)

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Screenshots

Add all the screenshots which support your changes

Summary by CodeRabbit

  • New Feature: Added a new feature to the Testimonials component across various course pages. Now, users can see more testimonials by clicking on a button that redirects them to a Twitter search for the relevant hashtag (e.g., "#DevOpsWithKunal", "#DSAWithKunal", "#OpenSourceWithKunal").
  • Refactor: Enhanced the Testimonials component's flexibility by adding two new props (btnText and btnLink) to customize the button text and link dynamically.

@coderabbitai
Copy link

coderabbitai bot commented Sep 2, 2023

Walkthrough

The changes primarily revolve around the addition of new props (btnText and btnLink) to the Testimonials component across various pages. These props allow for a button with custom text and link to be rendered within the Testimonials section, providing an avenue for users to view more testimonials.

Changes

File Summary
src/components/layout/Testimonials.jsx Modified to import ArrowLink and ButtonLink components. Added btnText and btnLink props to render a link button if btnLink is provided.
src/content/courses/devops.js, src/content/courses/dsa.js New buttons added to DevopsPageContent and DsaPageContent objects respectively, with static content and links.
src/pages/OpenSourceCoursePage.jsx, src/pages/SingleCoursePage.jsx Added btnText and btnLink props to the Testimonials component, allowing for a button to be rendered with specified text and link.

"In the land of code, where logic intertwines,
A rabbit hops along the lines.
With each leap, a change takes form,
A new feature is born, out of the norm.
Testimonials now have a new friend,
A button that leads to a trend.
Hop, hop, hop, the rabbit goes,
Celebrating the code that flows. 🐇💻🎉"


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • Mention @coderabbitai in any review comment for bot assistance. The bot stays silent unless called upon.
  • Note: Review comments are made on code diffs or files, not on the PR overview.

Pause Incremental Reviews

  • Insert @coderabbitai: ignore in the PR description to halt the bot's ongoing reviews. Remove the line to resume.

@github-actions github-actions bot added the team label Sep 2, 2023
Copy link

@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.

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 179a334 and ec36ad6 commits.
Files selected for processing (5)
  • src/components/layout/Testimonials.jsx (3 hunks)
  • src/content/courses/devops.js (1 hunks)
  • src/content/courses/dsa.js (1 hunks)
  • src/pages/OpenSourceCoursePage.jsx (1 hunks)
  • src/pages/SingleCoursePage.jsx (1 hunks)
Files skipped from review due to trivial changes (4)
  • src/content/courses/devops.js
  • src/content/courses/dsa.js
  • src/pages/OpenSourceCoursePage.jsx
  • src/pages/SingleCoursePage.jsx
Additional comments (Suppressed): 3
src/components/layout/Testimonials.jsx (3)
  • 4-10: The import of ArrowLink and ButtonLink components is added. These components are used to create the "See more testimonials" button.

  • 14-19: Two new props btnText and btnLink are introduced in the Testimonials component. They are used to set the text and link of the "See more testimonials" button respectively.

  • 62-74: The "See more testimonials" button is conditionally rendered based on the truthiness of btnLink. If btnLink is provided, an ArrowLink component is rendered with href set to btnLink and the button text set to btnText. The openNewTab prop ensures that the link opens in a new tab. The as={ButtonLink} prop changes the rendering of ArrowLink to use the ButtonLink component.

+         <div className='mt-4 flex gap-2'>
+           {btnLink && (
+             <ArrowLink openNewTab as={ButtonLink} href={btnLink}>
+               {btnText}
+             </ArrowLink>
+           )}
+         </div>

@Susmita-Dey Susmita-Dey merged commit 6d29dc7 into WeMakeDevs:main Sep 2, 2023
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant