'use client'; import { useEffect, useRef, useState } from 'react'; import { PlusCircle, ArrowUpRight, Headphones } from 'lucide-react'; import * as Badge from '@/components/ui/badge'; import * as LinkButton from '@/components/ui/link-button'; type TabKey = 'engineering' | 'development'; const tabsData: { id: TabKey; label: string }[] = [ { id: 'engineering', label: 'Engineering' }, { id: 'development', label: 'Development' }, ]; const jobsData: Record< TabKey, { id: string; title: string; description: string; location: string }[] > = { engineering: [ { id: 'eng1', title: 'Engineering Manager', description: 'Lead a team of engineers and deliver great experiences.', location: 'Remote', }, { id: 'eng2', title: 'Software Engineer', description: 'Build scalable software and deliver great experiences.', location: 'Remote', }, { id: 'eng3', title: 'Data Scientist', description: 'Build scalable data pipelines and deliver great experiences.', location: 'Remote', }, ], development: [ { id: 'dev1', title: 'Frontend Developer', description: 'Build amazing user interfaces and deliver great experiences.', location: 'Remote', }, { id: 'dev2', title: 'UI/UX Designer', description: 'Design intuitive products and improve user experiences.', location: 'Remote', }, { id: 'dev3', title: 'React Developer', description: 'Develop scalable web apps and maintain clean codebases.', location: 'Remote', }, ], }; export default function EngineeringCareersList() { const [activeTab, setActiveTab] = useState('development'); const containerRef = useRef(null); const buttonRefs = useRef>({ engineering: null, development: null, }); const [thumbLeft, setThumbLeft] = useState(4); const [thumbWidth, setThumbWidth] = useState(0); const repositionThumb = () => { const container = containerRef.current; const activeEl = buttonRefs.current[activeTab]; if (!container || !activeEl) return; const containerRect = container.getBoundingClientRect(); const activeRect = activeEl.getBoundingClientRect(); const left = activeRect.left - containerRect.left + 0; setThumbLeft(left); setThumbWidth(activeRect.width); }; useEffect(() => { repositionThumb(); // Reposition on resize const handle = () => repositionThumb(); window.addEventListener('resize', handle); const id = window.setInterval(repositionThumb, 250); return () => { window.removeEventListener('resize', handle); window.clearInterval(id); }; }, [activeTab]); return (
Join our team

Exciting careers for bright minds

Connect your favorite apps to boost productivity and keep every.

{tabsData.map((tab) => ( ))}
{tabsData.map((tab) => (
{jobsData[tab.id]?.map((job, index) => { const isLast = index === jobsData[tab.id].length - 1; return (
{job.title}
{job.description}
{job.location}
); })}
))}
Streamline hiring and onboarding today Learn more
); }