Skip to content

Commit

Permalink
fix(watch): trim tl;dr and do not justify it on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
gdarchen committed Jul 1, 2024
1 parent f9aae77 commit 0b6522d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/watch/watchResource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ const ResourceType: FC<{ type: WatchResource['type'] }> = ({ type }) => {

const WatchResource: FC<Props> = ({ resource }) => {
const { title, tldr, source, subSource, url, type } = resource
const tldrWithDot = tldr?.endsWith('.') ? tldr : `${tldr}.`
const trimedTldr = tldr?.trim()
const tldrWithDot = trimedTldr?.endsWith('.') ? trimedTldr : `${trimedTldr}.`

return (
<a
Expand All @@ -48,7 +49,7 @@ const WatchResource: FC<Props> = ({ resource }) => {
{title}
</h5>
<div className="grid grid-cols-6 gap-4 font-normal text-gray-700 dark:text-gray-400">
<div className="col-span-6 line-clamp-4 text-justify font-mono text-xs md:line-clamp-6">
<div className="col-span-6 line-clamp-4 text-left font-mono text-xs md:line-clamp-6 md:text-justify">
{tldrWithDot}
</div>
</div>
Expand Down

0 comments on commit 0b6522d

Please sign in to comment.