Merge pull request #361 from on-deck/fix/event-type-description

fix: truncate event type description instead of title
pull/363/head
Bailey Pumfleet 2021-07-14 13:12:30 +01:00 committed by GitHub
commit ecd0360d9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -121,7 +121,7 @@ export default function Availability(props) {
</div>
<div className="flex flex-col mb-8">
<div className="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div className="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div className="py-2 align-middle inline-block max-w-full min-w-full sm:px-6 lg:px-8">
<div className="shadow overflow-hidden border-b border-gray-200 rounded-lg">
<table className="min-w-full divide-y divide-gray-200">
<thead className="bg-gray-50">
@ -143,7 +143,7 @@ export default function Availability(props) {
<tbody className="bg-white divide-y divide-gray-200">
{props.types.map((eventType) =>
<tr>
<td className="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
<td className="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 align-top">
{eventType.title}
{eventType.hidden &&
<span className="ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-800">
@ -151,13 +151,13 @@ export default function Availability(props) {
</span>
}
</td>
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<td className="px-6 py-4 text-sm text-gray-500 align-top">
{eventType.description}
</td>
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-500 align-top">
{eventType.length} minutes
</td>
<td className="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<td className="px-6 py-4 whitespace-nowrap text-right text-sm font-medium align-top">
<Link href={"/" + props.user.username + "/" + eventType.slug}><a target="_blank" className="text-blue-600 hover:text-blue-900 mr-2">View</a></Link>
<Link href={"/availability/event/" + eventType.id}><a className="text-blue-600 hover:text-blue-900">Edit</a></Link>
</td>

View File

@ -103,8 +103,8 @@ export default function Home(props) {
<div className="min-w-0 flex-1 sm:flex sm:items-center sm:justify-between">
<div className="truncate">
<div className="flex text-sm">
<p className="font-medium text-blue-600 truncate">{type.title}</p>
<p className="ml-1 flex-shrink-0 font-normal text-gray-500">
<p className="flex-shrink-0 font-medium text-blue-600 truncate">{type.title}</p>
<p className="ml-1 font-normal text-gray-500 truncate">
in {type.description}
</p>
</div>