diff --git a/src/components/sections/contact-box/ContactSelector.tsx b/src/components/sections/contact-box/ContactSelector.tsx index 5bdb25905..e48b4fb1f 100644 --- a/src/components/sections/contact-box/ContactSelector.tsx +++ b/src/components/sections/contact-box/ContactSelector.tsx @@ -1,9 +1,10 @@ "use client"; -import { use, useState } from "react"; +import { use } from "react"; import EmployeeCard from "src/components/employeeCard/EmployeeCard"; import { Tag } from "src/components/tag"; +import useTabs from "src/utils/hooks/useTabs"; import styles from "./contact-box.module.css"; import { EmployeeAndMetadata } from "./types"; @@ -22,10 +23,7 @@ export default function ContactSelector({ background = "dark", }: ContactSelectorProps) { const contactPoints = use(contactPointsPromise); - - const [selectedTag, setSelectedTag] = useState( - contactPoints[0]?.tagSlug, - ); + const { tabListRef, selectedTabIndex } = useTabs(); if (!contactPoints.length) { return null; @@ -33,30 +31,32 @@ export default function ContactSelector({ return (
-
- {contactPoints.map((contactPoint) => ( - setSelectedTag(contactPoint.tagSlug)} - text={contactPoint.tag} - /> +
    + {contactPoints.map((contactPoint, index) => ( +
  • + +
  • ))} -
+
- {contactPoints.map((contactPoint) => ( + {contactPoints.map((contactPoint, index) => (