Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 01a316b

Browse files
committed
Truncate the bio to 2 lines in members page
1 parent 905f700 commit 01a316b

File tree

5 files changed

+10
-2
lines changed

5 files changed

+10
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"dependencies": {
2222
"@badrap/bar-of-progress": "0.1.2",
2323
"@headlessui/react": "0.3.1",
24+
"@tailwindcss/line-clamp": "0.2.0",
2425
"classnames": "2.2.6",
2526
"fauna-schema-migrate": "0.1.7",
2627
"faunadb": "4.1.0",

src/components/HomePageFeed.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
ChatCenteredDots,
44
Gear,
55
RocketLaunch,
6-
ShareNetwork,
76
ThumbsUp,
87
UserCircle,
98
Users,

src/components/members/Member.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ export default function Member({ user }: { user: User }) {
6161
</A>
6262
<dl className="mt-1 flex-grow flex flex-col justify-between">
6363
<dt className="sr-only">Bio</dt>
64-
<dd className="text-gray-500 text-xs">{account.bio}</dd>
64+
<dd className="text-gray-500 text-xs line-clamp-2">
65+
{account.bio}
66+
</dd>
6567
<dt className="sr-only">Role</dt>
6668
<dt className="sr-only">Social Media</dt>
6769
{socials && (

tailwind.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ module.exports = {
5050
require('@tailwindcss/forms'),
5151
require('@tailwindcss/typography'),
5252
require('@tailwindcss/aspect-ratio'),
53+
require('@tailwindcss/line-clamp'),
5354
require('nightwind'),
5455
],
5556
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@
276276
dependencies:
277277
mini-svg-data-uri "^1.2.3"
278278

279+
"@tailwindcss/[email protected]":
280+
version "0.2.0"
281+
resolved "https://registry.yarnpkg.com/@tailwindcss/line-clamp/-/line-clamp-0.2.0.tgz#7f30f26ed3835d64d1eb5a9b0d60cf5291dd2a3b"
282+
integrity sha512-+jXSdRK3/9V/BCPCr+iNpMMhxWMMv62vn/AS2b3/ClmueGuhCijW3bUwO1IiHnE7uCaF74Sli8jUCv9djwvpLg==
283+
279284
"@tailwindcss/[email protected]":
280285
version "0.4.0"
281286
resolved "https://registry.yarnpkg.com/@tailwindcss/typography/-/typography-0.4.0.tgz#b80974ad6af93df7b06e1981cb4d79698b6ad5c7"

0 commit comments

Comments
 (0)