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 #731 from Susmita-Dey/main
Browse files Browse the repository at this point in the history
Rebuilt testimonial section for DSA page
  • Loading branch information
AnuragThePathak authored Aug 5, 2023
2 parents 39275e5 + ebbcd1a commit ff429d2
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 10 deletions.
Binary file added src/assets/courses/testimonials/Manoj.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/courses/testimonials/arsalan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/courses/testimonials/muhammad.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/courses/testimonials/sagar_rawat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 38 additions & 1 deletion src/components/layout/Testimonials.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Carousel from 'better-react-carousel';
import { AiFillLeftCircle, AiFillRightCircle } from 'react-icons/ai';

import clsxm from '@/lib/utils';

import TestimonialCard from '@/components/Cards/TestimonialCard';
import TweetCarousael from '@/components/TweetCarousael';

const Testimonials = ({
Expand All @@ -8,6 +12,7 @@ const Testimonials = ({
as = 'section',
className,
setTweetId,
content,
}) => {
const Compoonent = as || 'section';
return (
Expand All @@ -21,7 +26,39 @@ const Testimonials = ({
<h2 className='h1'>{title}</h2>
<hr className='styled-hr' />

<TweetCarousael tweetId={tweetId} setTweetId={setTweetId} />
{tweetId ? (
<TweetCarousael tweetId={tweetId} setTweetId={setTweetId} />
) : (
<div className='flex flex-col gap-4'>
<Carousel
cols={3}
rows={1}
gap={20}
autoplay={2500}
dotColorActive='rgb(89,66,233)'
arrowRight={
<AiFillRightCircle
size={50}
className='absolute top-1/2 right-[-35px] z-10 -translate-y-1/2 cursor-pointer rounded-full bg-black text-2xl text-indigo-600'
/>
}
arrowLeft={
<AiFillLeftCircle
size={50}
className='absolute top-1/2 left-[-35px] z-10 -translate-y-1/2 cursor-pointer rounded-full bg-black text-2xl text-indigo-600'
/>
}
showDots
loop
>
{content?.map((item) => (
<Carousel.Item key={item.from}>
<TestimonialCard {...item} />
</Carousel.Item>
))}
</Carousel>
</div>
)}
</div>
</Compoonent>
);
Expand Down
34 changes: 26 additions & 8 deletions src/content/courses/dsa.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { SingleCoursesPageHeader } from '@/content/courses/CoursesPageContent';

import arsalan from '@/assets/courses/testimonials/arsalan.jpg';
import Manoj from '@/assets/courses/testimonials/Manoj.jpg';
import muhammad from '@/assets/courses/testimonials/muhammad.jpg';

const DsaPageContent = {
header: SingleCoursesPageHeader,
content: {
Expand Down Expand Up @@ -119,14 +123,28 @@ const DsaPageContent = {
"Greedy algorithms, tries, sliding window, two pointer, kadane's algorithm, and more!",
},
],
tweetId: [
'1620824479395090435',
'1620081639199244288',
'1620489706994806785',
'1620828035804184579',
'1617535692497883138',
'1487399069383155716',
'1544248976664567811',
testimonials: [
{
src: arsalan,
description:
'#100DaysOfCode Resumed my DSA after so many days. Right Now learning String, Subset and Subsequence question from Recursion playlist of @kunalstwt #DSAWithKunal',
from: 'ARSALAN',
designation: '@Arsalan_0101',
},
{
src: muhammad,
description:
'Started with #DSAWithKunal and #LearningWithApoorv and many other resources for Web development. I will now be shifting towards technical blogs about Web Development and DSA. Whatever I learn, will come in the form of blogs and threads.',
from: 'MUHAMMAD NOORANI',
designation: '@MuhammadN_twts',
},
{
src: Manoj,
description:
"🎯 Thrilled to have cracked interview questions from major tech giants like Facebook, all thanks to the invaluable guidance of Kunal Kushwaha!🏆 I've compiled my solutions on GitHub for those prepping for technical interviews. #interviewsuccess #DSAWithKunal",
from: 'MANOJ KUMAR',
designation: '@manojkumarbonala',
},
],
},

Expand Down
8 changes: 7 additions & 1 deletion src/pages/SingleCoursePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ const CoursesPage = ({ content }) => {
return (
<Layout content={content}>
<About content={content.content} />
<Testimonials tweetId={tweetId} setTweetId={setTweetId} />
{tweetId ? (
<Testimonials tweetId={tweetId} setTweetId={setTweetId} />
) : (
<>
<Testimonials content={content.content.testimonials} />
</>
)}
{content.content.syllabus.length > 0 && (
<Syllabus content={content.content} />
)}
Expand Down

0 comments on commit ff429d2

Please sign in to comment.