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

Commit

Permalink
Merge pull request #773 from Susmita-Dey/main
Browse files Browse the repository at this point in the history
Add more testimonials button in course pages
  • Loading branch information
Susmita-Dey authored Sep 2, 2023
2 parents 179a334 + ec36ad6 commit 6d29dc7
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/components/layout/Testimonials.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { AiFillLeftCircle, AiFillRightCircle } from 'react-icons/ai';
import clsxm from '@/lib/utils';

import TestimonialCard from '@/components/Cards/TestimonialCard';
import { ArrowLink, ButtonLink } from '@/components/links';
import TweetCarousael from '@/components/TweetCarousael';

const Testimonials = ({
Expand All @@ -13,6 +14,8 @@ const Testimonials = ({
className,
setTweetId,
content,
btnText,
btnLink,
}) => {
const Compoonent = as || 'section';
return (
Expand Down Expand Up @@ -59,6 +62,13 @@ const Testimonials = ({
</Carousel>
</div>
)}
<div className='mt-4 flex gap-2'>
{btnLink && (
<ArrowLink openNewTab as={ButtonLink} href={btnLink}>
{btnText}
</ArrowLink>
)}
</div>
</div>
</Compoonent>
);
Expand Down
3 changes: 3 additions & 0 deletions src/content/courses/devops.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ const DevopsPageContent = {
'1487399069383155716',
'1544248976664567811',
],
btnText: 'See more testimonials #DevOpsWithKunal',
btnLink:
'https://twitter.com/search?q=%23DevOpsWithKunal&src=hashtag_click',
},

faq: [
Expand Down
2 changes: 2 additions & 0 deletions src/content/courses/dsa.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ const DsaPageContent = {
designation: '@manojkumarbonala',
},
],
btnText: 'See more testimonials #DSAWithKunal',
btnLink: 'https://twitter.com/search?q=%23DSAWithKunal&src=hashtag_click',
},

faq: [
Expand Down
2 changes: 2 additions & 0 deletions src/pages/OpenSourceCoursePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ const OpenSourcePage = ({ content }) => {
tweetId={tweetId}
setTweetId={setTweetId}
title='Testimonials'
btnText='See more testimonials #OpenSourceWithKunal'
btnLink='https://twitter.com/search?q=%23OpenSourceWithKunal'
/>
<Faq faq={content.faq} />

Expand Down
13 changes: 11 additions & 2 deletions src/pages/SingleCoursePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@ const CoursesPage = ({ content }) => {
<Layout content={content}>
<About content={content.content} />
{tweetId ? (
<Testimonials tweetId={tweetId} setTweetId={setTweetId} />
<Testimonials
tweetId={tweetId}
setTweetId={setTweetId}
btnText={content.content.btnText}
btnLink={content.content.btnLink}
/>
) : (
<>
<Testimonials content={content.content.testimonials} />
<Testimonials
content={content.content.testimonials}
btnText={content.content.btnText}
btnLink={content.content.btnLink}
/>
</>
)}
{content.content.syllabus.length > 0 && (
Expand Down

0 comments on commit 6d29dc7

Please sign in to comment.