File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
app/[locale]/(user)/publishers Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 1+ import React from 'react' ;
12import Image from 'next/image' ;
23import Link from 'next/link' ;
3- import { Text } from 'opub-ui' ;
4- import React from 'react' ;
5-
4+ import { Text , Tooltip } from 'opub-ui' ;
65
76interface CardProps {
87 data : any ;
98}
109
1110const PublisherCard : React . FC < CardProps > = ( { data } ) => {
12- return (
11+ return (
1312 < div className = "my-10" >
1413 < div className = " grid w-full grid-cols-1 gap-10 md:grid-cols-2 lg:grid-cols-3 lg:gap-16" >
1514 { data . map ( ( item : any , index : any ) => (
@@ -68,6 +67,23 @@ const PublisherCard: React.FC<CardProps> = ({ data }) => {
6867 </Text>
6968 </div> */ }
7069 </ div >
70+ { ( item ?. bio || item ?. description ) && (
71+ < div >
72+ < Tooltip
73+ content = {
74+ item . __typename === 'TypeUser'
75+ ? item ?. bio
76+ : item ?. description
77+ }
78+ >
79+ < Text >
80+ { item . __typename === 'TypeUser'
81+ ? item . bio . slice ( 0 , 100 ) + '...'
82+ : item . description . slice ( 0 , 100 ) + '...' }
83+ </ Text >
84+ </ Tooltip >
85+ </ div >
86+ ) }
7187 </ Link >
7288 ) ) }
7389 </ div >
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ const getAllPublishers: any = graphql(`
1818 ... on TypeOrganization {
1919 name
2020 id
21+ description
2122 logo {
2223 url
2324 }
@@ -28,6 +29,7 @@ const getAllPublishers: any = graphql(`
2829 ... on TypeUser {
2930 fullName
3031 id
32+ bio
3133 profilePicture {
3234 url
3335 }
You can’t perform that action at this time.
0 commit comments