Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: testimonial loading, animation and ui fixes (#479) #480

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ html {
display: inline-block;
transform: rotate(-2deg);
}

.react-tweet-theme {
height: 100%;
}
Expand Down
8 changes: 7 additions & 1 deletion src/components/Testimonials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const tweetIds = [
'1826968639049724010',
];

const finalTweetIds = [...tweetIds, ...tweetIds];

export default function Testimonials() {
return (
<div
Expand All @@ -24,7 +26,11 @@ export default function Testimonials() {
Real Success Stories from Job Seekers and Employers
</p>
</div>
<InfiniteMovingCards items={tweetIds} direction="right" speed="slow" />
<InfiniteMovingCards
items={finalTweetIds}
direction="right"
speed="slow"
/>
</div>
);
}
11 changes: 1 addition & 10 deletions src/components/ui/infinite-moving-cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ export const InfiniteMovingCards = ({
const [start, setStart] = useState(false);
function addAnimation() {
if (containerRef.current && scrollerRef.current) {
const scrollerContent = Array.from(scrollerRef.current.children);

scrollerContent.forEach((item) => {
const duplicatedItem = item.cloneNode(true);
if (scrollerRef.current) {
scrollerRef.current.appendChild(duplicatedItem);
}
});

getDirection();
getSpeed();
setStart(true);
Expand Down Expand Up @@ -84,7 +75,7 @@ export const InfiniteMovingCards = ({
>
{items.map((id, index) => (
<li
className="w-[350px] min-h-fit h-[700px] max-w-full relative rounded-2xl flex-shrink-0 px-8 py-6 md:w-[450px]"
className="w-[350px] min-h-fit max-w-full relative rounded-2xl flex-shrink-0 px-8 py-6 md:w-[450px]"
// style={{
// background:
// 'linear-gradient(180deg, var(--slate-800), var(--slate-900)',
Expand Down
Loading