Skip to content

Commit 9f87129

Browse files
authored
make cap selection bar appear faster, fix weird hover of thumbnails (#1054)
1 parent b0fb8ad commit 9f87129

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

apps/web/app/(org)/dashboard/caps/components/CapCard/CapCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,11 @@ export const CapCard = ({
288288
onDragStart={handleDragStart}
289289
onDragEnd={handleDragEnd}
290290
className={clsx(
291-
"flex relative transition-colors duration-200 flex-col gap-4 w-full h-full rounded-xl cursor-default bg-gray-1 border border-gray-3 group border-px",
291+
"flex relative overflow-hidden transition-colors duration-200 flex-col gap-4 w-full h-full rounded-xl cursor-default bg-gray-1 border border-gray-3 group",
292292
isSelected
293-
? "!border-blue-10 border-px"
293+
? "!border-blue-10"
294294
: anyCapSelected
295-
? "border-blue-10 border-px hover:border-blue-10"
295+
? "border-blue-10 hover:border-blue-10"
296296
: "hover:border-blue-10",
297297
isDragging && "opacity-50",
298298
isOwner && !anyCapSelected && "cursor-grab active:cursor-grabbing",

apps/web/app/(org)/dashboard/caps/components/SelectedCapsBar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ export const SelectedCapsBar = ({
4444
transition: { duration: 0.2 },
4545
}}
4646
transition={{
47-
opacity: { duration: 0.3, ease: "easeOut" },
48-
y: { type: "spring", damping: 15, stiffness: 200 },
49-
scale: { type: "spring", damping: 15, stiffness: 200 },
47+
opacity: { duration: 0.2, ease: "easeOut" },
48+
y: { type: "spring", damping: 15, stiffness: 300 },
49+
scale: { type: "spring", damping: 15, stiffness: 300 },
5050
}}
5151
>
5252
<div className="flex gap-1 text-sm font-medium text-gray-10">

apps/web/components/VideoThumbnail.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const VideoThumbnail: React.FC<VideoThumbnailProps> = memo(
8585
>("loading");
8686

8787
useEffect(() => {
88-
if (imageRef.current?.complete && imageRef.current.naturalWidth != 0) {
88+
if (imageRef.current?.complete && imageRef.current.naturalWidth !== 0) {
8989
setImageStatus("success");
9090
}
9191
}, []);
@@ -124,7 +124,7 @@ export const VideoThumbnail: React.FC<VideoThumbnailProps> = memo(
124124
key={videoId}
125125
style={{ objectFit: objectFit as any }}
126126
className={clsx(
127-
"w-full h-full",
127+
"w-full h-full rounded-t-xl",
128128
imageClass,
129129
imageStatus === "loading" && "opacity-0",
130130
)}

0 commit comments

Comments
 (0)