Skip to content

Commit

Permalink
fixup for the extra space
Browse files Browse the repository at this point in the history
  • Loading branch information
jenbreese committed Aug 23, 2024
1 parent 9dae2f0 commit 98b9a23
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ const TableRow = ({id, imageUrl, path, title, phone, email, mapUrl, address, hou
</Link>
</Th>
<Td className="branch-hours flex w-auto justify-center sm:border-b sm:border-black-40 md:items-center md:justify-start lg:table-cell lg:w-1/4 lg:pr-20 lg:align-middle xl:pr-80">
{hoursId ? (
{hoursId && (
<div className="pb-16 lg:pb-0">
<BranchHours hoursId={hoursId} />
</div>
) : (
""
)}
{/* Without this, the responsive table library injects a "&nbsp;". */}
{""}
</Td>
<Td className="block w-auto sm:border-b sm:border-black-40 lg:table-cell lg:w-1/4 lg:pr-20 lg:align-middle xl:pr-80">
{phone && (
Expand All @@ -171,17 +171,17 @@ const TableRow = ({id, imageUrl, path, title, phone, email, mapUrl, address, hou
{phone}
</a>
)}
{email ? (
{email && (
<a
href={`mailto:${email}`}
className="m-auto mb-16 flex w-fit items-center justify-center gap-4 text-16 font-normal leading-[23px] no-underline hover:bg-black-10 hover:text-brick-dark hover:underline focus:bg-none md:mx-[unset] md:justify-start lg:mb-0"
>
<EnvelopeIcon title="Email" width={20} />
{email}
</a>
) : (
""
)}
{/* Without this, the responsive table library injects a "&nbsp;". */}
{""}
</Td>
<Td className="block w-auto text-16 leading-[23px] sm:border-b sm:border-black-40 lg:table-cell lg:w-1/4 lg:align-middle">
{address && mapUrl && (
Expand Down
6 changes: 3 additions & 3 deletions src/components/views/sul-people/sul-people-table-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,13 @@ const SulPeopleTableView = ({items, hasHeading}: Props) => {
)}
</Td>
<Td className="block w-auto px-0 py-16 text-center md:border-b md:border-black-40 md:px-9 md:py-16 md:text-left lg:table-cell lg:w-1/5">
{item.libCalId ? (
{item.libCalId && (
<div className="pb-16 lg:pb-0">
<LibCal libcalId={item.libCalId} srText={item.title} />
</div>
) : (
""
)}
{/* Without this, the responsive table library injects a "&nbsp;". */}
{""}
</Td>
</Tr>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ const StudyPlaceFilteringTable = ({items}: Props) => {
className="block sm:flex-col sm:flex-wrap md:grid md:grid-cols-2 md:grid-rows-[repeat(5,minmax(0,auto))] md:justify-items-start md:gap-x-20 md:text-left lg:!table-row lg:max-h-none"
>
<Td className="table-image m-auto block min-h-fit w-auto place-content-center justify-center sm:border-b sm:border-black-40 md:row-span-5 lg:table-cell lg:min-h-fit lg:w-[125px] lg:pr-32">
{item.branchImageUrl ? (
{item.branchImageUrl && (
<div className="relative my-16 block aspect-[3/2] w-auto max-w-[338px] overflow-hidden md:w-[360px] lg:max-w-[125px]">
<Image
className="object-contain"
Expand All @@ -220,9 +220,9 @@ const StudyPlaceFilteringTable = ({items}: Props) => {
sizes="(max-width: 992px) 300px, 150px"
/>
</div>
) : (
""
)}
{/* Without this, the responsive table library injects a "&nbsp;". */}
{""}
</Td>
<Th
scope="row"
Expand All @@ -245,13 +245,13 @@ const StudyPlaceFilteringTable = ({items}: Props) => {
</Link>
</Td>
<Td className="justify-left flex w-auto sm:border-b sm:border-black-40 md:text-left lg:table-cell lg:w-1/5 lg:pr-32">
{item.libHours ? (
{item.libHours && (
<div className="pb-16 text-16 leading-[23px] lg:pb-0">
{item.libHours && <BranchHours hoursId={item.libHours} />}
</div>
) : (
""
)}
{/* Without this, the responsive table library injects a "&nbsp;". */}
{""}
</Td>
<Td className="block w-auto sm:border-b sm:border-black-40 md:text-left lg:table-cell lg:w-2/5 lg:pr-32">
{item.features && (
Expand All @@ -262,7 +262,7 @@ const StudyPlaceFilteringTable = ({items}: Props) => {
)}
</Td>
<Td className="block w-auto sm:border-b sm:border-black-40 md:text-left lg:table-cell lg:w-1/5">
{item.libCalId ? (
{item.libCalId && (
<a
href={`https://appointments.library.stanford.edu/space/${item.libCalId}`}
className="button mb-16 w-fit whitespace-nowrap border border-solid border-cardinal-red bg-white py-[4px] text-16 leading-[22px] text-cardinal-red hocus:bg-cardinal-red hocus:text-white hocus:shadow-button md:w-full lg:mb-0 lg:w-fit"
Expand All @@ -274,9 +274,9 @@ const StudyPlaceFilteringTable = ({items}: Props) => {
</div>
</div>
</a>
) : (
""
)}
{/* Without this, the responsive table library injects a "&nbsp;". */}
{""}
</Td>
</Tr>
))}
Expand Down

0 comments on commit 98b9a23

Please sign in to comment.