Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUL23-587: updates to the people table #193

Merged
merged 3 commits into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions src/components/views/sul-people/sul-people-table-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import Link from "next/link"
import Image from "next/image"
import LibCal from "./libcal"
import {EnvelopeIcon, XMarkIcon} from "@heroicons/react/20/solid"
import EmailLink from "@/components/patterns/elements/email-link"
import {XMarkIcon} from "@heroicons/react/20/solid"
import {EnvelopeIcon} from "@heroicons/react/24/outline"
import {Maybe, NodeStanfordPerson} from "@/lib/gql/__generated__/drupal.d"
import {Table, Thead, Tbody, Tr, Th, Td} from "react-super-responsive-table"
import "react-super-responsive-table/dist/SuperResponsiveTableStyle.css"
Expand Down Expand Up @@ -220,7 +220,7 @@ const SulPeopleTableView = ({items, hasHeading}: Props) => {
</Td>
<Th
scope="row"
className="block w-auto px-0 py-16 text-center sm:p-0 md:text-left lg:table-cell lg:w-1/4 lg:pr-72"
className="block w-auto px-0 text-center sm:p-0 md:text-left lg:table-cell lg:w-1/4 lg:py-16 lg:pr-72"
>
{item.title && (
<Link
Expand Down Expand Up @@ -248,16 +248,18 @@ const SulPeopleTableView = ({items, hasHeading}: Props) => {
<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 lg:pr-72">
{item.email && (
<>
<EnvelopeIcon
title="Email"
width={20}
className="mr-6 inline-block text-digital-blue"
/>

<EmailLink
email={item.email}
className="break-words text-16 font-normal leading-[23px] text-digital-blue underline transition-colors hover:bg-black-10 hover:text-brick-dark focus:bg-none focus:text-cardinal-red active:text-cardinal-red"
/>
<Link
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set the prop prefetch={false} when linking to outside places like mailto or other sites

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know. I looked it up and now know why. :)

href={`mailto:${item.email}`}
prefetch={false}
className="whitespace-nowrap text-16 font-normal leading-[23px] text-digital-blue underline transition-colors hover:bg-black-10 hover:text-brick-dark focus:bg-none focus:text-cardinal-red active:text-cardinal-red"
>
<EnvelopeIcon
title="Email"
width={20}
className="mr-6 inline-block"
/>
{item.email}
</Link>
</>
)}
</Td>
Expand Down
Loading