This commit is contained in:
eric
2026-06-08 06:05:31 -05:00
parent ebfec37e47
commit 06ab949d81
77 changed files with 3646 additions and 358 deletions

View File

@@ -12,6 +12,8 @@ interface SwipeCardProps {
isAnimatingOut: "left" | "right" | null;
onLike: () => void;
onDislike: () => void;
onSuperLike?: () => void;
showSuperLike?: boolean;
onBeginDrag: (clientX: number) => void;
onMoveDrag: (clientX: number) => void;
onEndDrag: () => void;
@@ -26,6 +28,8 @@ export default function SwipeCard({
isAnimatingOut,
onLike,
onDislike,
onSuperLike,
showSuperLike = false,
onBeginDrag,
onMoveDrag,
onEndDrag,
@@ -76,17 +80,20 @@ export default function SwipeCard({
<Link
href={`/feedback?type=report&target=${encodeURIComponent(profile.id)}`}
className="text-sm font-medium text-[#ff4d4f] hover:text-red-600"
onPointerDown={(e) => e.stopPropagation()}
>
{t("report")}
</Link>
</div>
<div className="mb-6 mt-12 flex justify-center">
<img
src={mediaUrl(profile.photo)}
alt={profile.name}
className="h-28 w-28 rounded-full border-4 border-white/50 object-cover shadow-lg"
/>
<Link href={`/members/${profile.id}`} onPointerDown={(e) => e.stopPropagation()}>
<img
src={mediaUrl(profile.photo)}
alt={profile.name}
className="h-28 w-28 rounded-full border-4 border-white/50 object-cover shadow-lg transition hover:scale-105"
/>
</Link>
</div>
<div className="mb-4 text-center">
@@ -114,11 +121,17 @@ export default function SwipeCard({
<p className="mb-8 px-2 text-center text-sm leading-relaxed text-white/95">{profile.bio}</p>
<div className="flex items-center justify-center gap-8">
<div
className={`flex items-center justify-center ${showSuperLike ? "gap-5" : "gap-8"}`}
onPointerDown={(e) => e.stopPropagation()}
>
<div className="flex flex-col items-center gap-2">
<button
type="button"
onClick={onDislike}
onClick={(e) => {
e.stopPropagation();
onDislike();
}}
className="flex h-16 w-16 items-center justify-center rounded-full bg-white text-[#ff4d4f] shadow-lg transition-all hover:scale-105 hover:bg-red-50 active:scale-95"
aria-label={t("dislike")}
>
@@ -126,10 +139,29 @@ export default function SwipeCard({
</button>
<span className="text-xs font-medium text-white/80">{t("dislike")}</span>
</div>
{showSuperLike && onSuperLike ? (
<div className="flex flex-col items-center gap-2">
<button
type="button"
onClick={(e) => {
e.stopPropagation();
onSuperLike();
}}
className="flex h-14 w-14 items-center justify-center rounded-full bg-amber-400 text-white shadow-lg ring-2 ring-amber-200 transition-all hover:scale-105 hover:bg-amber-500 active:scale-95"
aria-label={t("superlike")}
>
<span className="text-xl">⭐</span>
</button>
<span className="text-xs font-medium text-white/80">{t("superlike")}</span>
</div>
) : null}
<div className="flex flex-col items-center gap-2">
<button
type="button"
onClick={onLike}
onClick={(e) => {
e.stopPropagation();
onLike();
}}
className="flex h-16 w-16 items-center justify-center rounded-full bg-[#22c55e] text-white shadow-lg transition-all hover:scale-105 hover:bg-[#16a34a] active:scale-95"
aria-label={t("like")}
>