@@ -14,6 +14,9 @@ import { CompatibleBadge } from './widgets/compatible-badge'
1414import { StarButton } from './widgets/star-button'
1515import clsx from 'clsx'
1616import Image from 'next/image'
17+ import { JSONContent } from "@tiptap/core" ;
18+ import { Content } from "web/components/widgets/editor" ;
19+ import React from "react" ;
1720
1821export const ProfileGrid = ( props : {
1922 lovers : Lover [ ]
@@ -38,7 +41,7 @@ export const ProfileGrid = (props: {
3841 < div className = "relative" >
3942 < div
4043 className = { clsx (
41- 'grid grid-cols-2 gap-2 opacity-100 transition-opacity duration-75 sm :grid-cols-3 md :grid-cols-4' ,
44+ 'grid grid-cols-1 sm:grid-cols-1 lg :grid-cols-1 xl :grid-cols-2 gap-6 py -4' ,
4245 isReloading && 'animate-pulse opacity-80'
4346 ) }
4447 >
@@ -75,7 +78,7 @@ function ProfilePreview(props: {
7578 refreshStars : ( ) => Promise < void >
7679} ) {
7780 const { lover, compatibilityScore, hasStar, refreshStars } = props
78- const { user, gender, age, pinned_url, city } = lover
81+ const { user, gender, age, pinned_url, city, bio } = lover
7982 const currentUser = useUser ( )
8083
8184 return (
@@ -84,54 +87,58 @@ function ProfilePreview(props: {
8487 onClick = { ( ) => {
8588 track ( 'click love profile preview' )
8689 } }
90+ className = "group block dark:bg-gray-800 rounded-lg overflow-hidden shadow hover:shadow-md transition-shadow duration-200 h-full"
8791 >
88- < Col className = "relative h-60 w-full overflow-hidden rounded text-white transition-all hover:z-20 hover:scale-110 hover:drop-shadow" >
89- { pinned_url ? (
90- < Image
91- src = { pinned_url }
92- width = { 180 }
93- height = { 240 }
94- alt = ""
95- className = "h-full w-full object-cover"
96- loading = "lazy"
97- priority = { false }
98- />
99- ) : (
100- < Col className = "bg-ink-300 h-full w-full items-center justify-center" >
101- < UserIcon className = "h-20 w-20" />
102- </ Col >
103- ) }
92+ < Col className = "relative h-40 w-full overflow-hidden rounded text-white transition-all hover:z-10 hover:scale-105 hover:drop-shadow" >
93+ { /*{ pinned_url ? (*/ }
94+ { /* <Image*/ }
95+ { /* src={pinned_url}*/ }
96+ { /* width={180}*/ }
97+ { /* height={240}*/ }
98+ { /* alt=""*/ }
99+ { /* className="h-full w-full object-cover"*/ }
100+ { /* loading="lazy"*/ }
101+ { /* priority={false}*/ }
102+ { /* />*/ }
103+ { /* ) : (*/ }
104+ { /* <Col className="bg-ink-300 h-full w-full items-center justify-center">*/ }
105+ { /* <UserIcon className="h-20 w-20" />*/ }
106+ { /* </Col>*/ }
107+ { /*)}*/ }
104108
105- < Row className = "absolute inset-x-0 right-0 top-0 items-start justify-between bg-gradient-to-b from-black/70 via-black/70 to-transparent px-2 pb-3 pt-2" >
106- { currentUser ? (
107- < StarButton
108- className = "!pt-0"
109- isStarred = { hasStar }
110- refresh = { refreshStars }
111- targetLover = { lover }
112- hideTooltip
113- />
114- ) : (
115- < div />
116- ) }
117- { compatibilityScore && (
118- < CompatibleBadge compatibility = { compatibilityScore } />
119- ) }
120- </ Row >
109+ { /* <Row className="absolute inset-x-0 right-0 top-0 items-start justify-between bg-gradient-to-b from-black/70 via-black/70 to-transparent px-2 pb-3 pt-2">*/ }
110+ { /* {currentUser ? (*/ }
111+ { /* <StarButton*/ }
112+ { /* className="!pt-0"*/ }
113+ { /* isStarred={hasStar}*/ }
114+ { /* refresh={refreshStars}*/ }
115+ { /* targetLover={lover}*/ }
116+ { /* hideTooltip*/ }
117+ { /* />*/ }
118+ { /* ) : (*/ }
119+ { /* <div />*/ }
120+ { /* )}*/ }
121+ { /* {compatibilityScore && (*/ }
122+ { /* <CompatibleBadge compatibility={compatibilityScore} />*/ }
123+ { /* )}*/ }
124+ { /* </Row>*/ }
121125
122- < Col className = "absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 via-black/70 to-transparent px-4 pb-2 pt-6" >
126+ < Col className = "absolute inset-x-0 bottom-0 bg-gradient-to-t to-transparent px-4 pb-2 pt-6" >
123127 < div >
124- < div className = "flex flex-wrap items-center gap-x-1 " >
128+ < div className = "flex-1 min-w-0 " >
125129 { /* <OnlineIcon last_online_time={last_online_time} /> */ }
126- < span >
127- < span className = "break-words font-semibold" > { user . name } </ span > ,
128- </ span >
129- { age }
130+ < h3 className = "text-lg font-medium text-gray-900 dark:text-white truncate" >
131+ { user . name }
132+ </ h3 >
133+ < p className = "text-sm text-gray-500 dark:text-gray-400" >
134+ < Content className = "w-full line-clamp-4" content = { lover . bio as JSONContent } />
135+ </ p >
136+ { /*{age}*/ }
130137 </ div >
131138 </ div >
132- < Row className = "gap-1 text-xs" >
133- { city } • { capitalize ( convertGender ( gender as Gender ) ) }
134- </ Row >
139+ { /* <Row className="gap-1 text-xs">*/ }
140+ { /* {city} • {capitalize(convertGender(gender as Gender))}*/ }
141+ { /* </Row>*/ }
135142 </ Col >
136143 </ Col >
137144 </ Link >
0 commit comments