All files / components ClientWork.tsx

100% Statements 2/2
100% Branches 9/9
100% Functions 2/2
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53                        4x       10x                                                                        
import type { ClientEngagement } from "@/content/clientWork";
import { ButtonLink } from "./ButtonLink";
import { TagList } from "./TagList";
 
export function ClientWork({
  engagements,
  showNote = true,
}: {
  engagements: readonly ClientEngagement[];
  /** The line explaining why there's nothing to show; turn off when the intro already says it. */
  showNote?: boolean;
}) {
  return (
    <div>
      <ul className="border-b border-line">
        {engagements.map((e) => (
          <li
            key={e.client}
            className="grid gap-x-8 gap-y-3 border-t border-line py-8 md:grid-cols-12"
          >
            <div className="md:col-span-4">
              <h3 className="display text-4xl">{e.client}</h3>
              <p className="mt-1 font-semibold">{e.what}</p>
            </div>
            <div className="flex flex-col gap-4 md:col-span-8">
              {e.detail && <p className="prose-measure text-muted">{e.detail}</p>}
              {e.stack.length > 0 && <TagList items={e.stack} label={`${e.client} technology`} />}
              {e.href && (
                <p>
                  <a className="link" href={e.href}>
                    Visit {new URL(e.href).hostname.replace(/^www\./, "")}
                  </a>
                </p>
              )}
            </div>
          </li>
        ))}
      </ul>
      <div className="mt-8 flex flex-wrap items-center gap-x-6 gap-y-4">
        {showNote && (
          <p className="prose-measure">
            Most of these are internal tools, so there&rsquo;s nothing public to show. I&rsquo;m
            happy to walk through them on a call.
          </p>
        )}
        <ButtonLink href="/contact" variant="quiet">
          Book a walkthrough
        </ButtonLink>
      </div>
    </div>
  );
}