'use client' import { useEffect, useState } from 'react' import { Sidebar } from '@/components/sidebar' import { api, type Integration } from '@/lib/api' import { Search } from 'lucide-react' const categories = ['All', 'Developer Tools', 'Communication', 'Productivity', 'CRM', 'Finance', 'Social', 'Other'] export default function AppsPage() { const [integrations, setIntegrations] = useState([]) const [loading, setLoading] = useState(true) const [category, setCategory] = useState('All') const [search, setSearch] = useState('') useEffect(() => { api.get('/api/apps') .then((data) => { setIntegrations(data); setLoading(false) }) .catch(() => setLoading(false)) }, []) const filtered = integrations.filter((i) => { const matchCat = category === 'All' || i.category === category const matchSearch = !search || i.name.toLowerCase().includes(search.toLowerCase()) || i.description.toLowerCase().includes(search.toLowerCase()) return matchCat && matchSearch }) return (

Apps

setSearch(e.target.value)} />
{categories.map((c) => ( ))}
{loading ? (
{Array.from({ length: 8 }).map((_, i) => (
))}
) : filtered.length === 0 ? (

No apps found

) : (
{filtered.map((i) => (
{i.name} (e.currentTarget.style.display = 'none')} />

{i.name}

{i.category}

{i.description}

{i.tool_count} tools {i.auth_type}
))}
)}
) }