From 4045629ca8f034fd030e1e2491f07202889b25e0 Mon Sep 17 00:00:00 2001
From: bender
Date: Tue, 10 Mar 2026 17:34:56 +0000
Subject: [PATCH] Update src/app/work/page.tsx
---
src/app/work/page.tsx | 128 +++++++++++++++++++++---------------------
1 file changed, 64 insertions(+), 64 deletions(-)
diff --git a/src/app/work/page.tsx b/src/app/work/page.tsx
index 8758d02..a03f0e2 100644
--- a/src/app/work/page.tsx
+++ b/src/app/work/page.tsx
@@ -2,45 +2,49 @@
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingOverlay from "@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay";
-import { useEffect, useRef, useState } from "react";
-import { Play } from "lucide-react";
+import { useEffect, useRef } from "react";
interface Clip {
id: string;
src: string;
- type: "video" | "image";
title: string;
+ link: string;
}
const clips: Clip[] = [
{
- id: "1", src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Ab38TzdGBnNuMLrvS5uTUM2zMr/uploaded-1772881146961-mr1xedhd.jpg", type: "image", title: "Viral Clip 1"},
+ id: "1", src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Ab38TzdGBnNuMLrvS5uTUM2zMr/uploaded-1773164050845-95xbsbl4.png", title: "Viral Clip 1", link: "https://www.tiktok.com/@brandonclipd/video/7593877522681564446"
+ },
{
- id: "2", src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Ab38TzdGBnNuMLrvS5uTUM2zMr/uploaded-1772881146961-h65hjshx.jpg", type: "image", title: "Viral Clip 2"},
+ id: "2", src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Ab38TzdGBnNuMLrvS5uTUM2zMr/uploaded-1773164050845-z2orboa3.png", title: "Viral Clip 2", link: "https://www.tiktok.com/@brandonclipd/video/7594523303847415070"
+ },
{
- id: "3", src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Ab38TzdGBnNuMLrvS5uTUM2zMr/uploaded-1772881750051-0ym5nbmx.jpg", type: "image", title: "Viral Clip 3"},
+ id: "3", src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Ab38TzdGBnNuMLrvS5uTUM2zMr/uploaded-1773164050845-4o4uoqq6.png", title: "Viral Clip 3", link: "https://drive.google.com/file/d/1QbP28qpbNlyWE-kJcLQXlZ70ai5ccjuw/view?usp=drivesdk"
+ },
{
- id: "4", src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Ab38TzdGBnNuMLrvS5uTUM2zMr/uploaded-1772881146961-1pjxjkc4.jpg", type: "image", title: "Viral Clip 4"},
+ id: "4", src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Ab38TzdGBnNuMLrvS5uTUM2zMr/uploaded-1773164050845-jhs1oav4.png", title: "Viral Clip 4", link: "https://drive.google.com/file/d/1TFDj__ZvlvGQah-3T6YRsw6wwCGrR2YW/view?usp=drivesdk"
+ },
{
- id: "5", src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Ab38TzdGBnNuMLrvS5uTUM2zMr/uploaded-1772881146961-mr1xedhd.jpg", type: "image", title: "Viral Clip 5"},
+ id: "5", src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Ab38TzdGBnNuMLrvS5uTUM2zMr/uploaded-1773164050845-j8dxb4nc.png", title: "Viral Clip 5", link: "https://drive.google.com/file/d/1Pt43OPdW-tMbRB_3DLumnhedP87cDZzo/view?usp=share_link"
+ }
];
export default function WorkPage() {
const scrollContainerRef = useRef(null);
- const [playingId, setPlayingId] = useState(null);
useEffect(() => {
const scrollContainer = scrollContainerRef.current;
if (!scrollContainer) return;
let scrollPosition = 0;
- const scrollSpeed = 1;
+ const scrollSpeed = 2;
const containerWidth = scrollContainer.scrollWidth;
const viewportWidth = scrollContainer.clientWidth;
const scroll = () => {
scrollPosition += scrollSpeed;
- if (scrollPosition >= containerWidth - viewportWidth) {
+ // Loop back to start for infinite scroll
+ if (scrollPosition >= containerWidth / 2) {
scrollPosition = 0;
}
scrollContainer.scrollLeft = scrollPosition;
@@ -50,8 +54,8 @@ export default function WorkPage() {
return () => clearInterval(interval);
}, []);
- const handleClipClick = (clipId: string) => {
- setPlayingId(playingId === clipId ? null : clipId);
+ const handleClipClick = (link: string) => {
+ window.open(link, "_blank");
};
return (
@@ -75,10 +79,11 @@ export default function WorkPage() {
{ name: "About", id: "about" },
{ name: "My Work", id: "/work" },
{ name: "Process", id: "process" },
- { name: "Contact", id: "contact" },
+ { name: "Contact", id: "contact" }
]}
button={{
- text: "Book A Call", href: "https://calendly.com/ibbiyousuf420/30min"}}
+ text: "Book A Call", href: "https://calendly.com/ibbiyousuf420/30min"
+ }}
/>
@@ -93,73 +98,68 @@ export default function WorkPage() {
- {/* Horizontal Scrolling Container */}
+ {/* Horizontal Infinite Scrolling Container */}
- {/* Duplicate clips to create infinite loop effect */}
+ {/* Duplicate clips for infinite loop effect */}
{[...clips, ...clips].map((clip, index) => (
handleClipClick(clip.id)}
+ width: "280px", aspectRatio: "9/16"
+ }}
+ onClick={() => handleClipClick(clip.link)}
+ role="link"
+ tabIndex={0}
+ onKeyDown={(e) => {
+ if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ handleClipClick(clip.link);
+ }
+ }}
>
- {/* Clip Container */}
+ {/* Clip Card Container */}
- {/* Image/Video */}
- {clip.type === "image" ? (
-

- ) : (
-
- )}
+ {/* Image */}
+

- {/* Overlay */}
-
- {playingId !== clip.id && (
-
- )}
+ {/* Hover Overlay */}
+
{/* Title */}
-
+
{clip.title}
@@ -169,10 +169,10 @@ export default function WorkPage() {
- {/* Info text */}
+ {/* Info Text */}
- 👆 Scroll horizontally • Click any clip to play
+ 👆 Continuous scroll • Click any card to view