"use client"; import type { ChangeEventHandler } from "react"; import { useState } from "react"; import Shell from "@calcom/features/shell/Shell"; import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { inferSSRProps } from "@calcom/types/inferSSRProps"; import type { HorizontalTabItemProps } from "@calcom/ui"; import { AllApps, AppStoreCategories, HorizontalTabs, TextField, PopularAppsSlider, RecentAppsSlider, } from "@calcom/ui"; import { Icon } from "@calcom/ui"; import { type getServerSideProps } from "@lib/apps/getServerSideProps"; import AppsLayout from "@components/apps/layouts/AppsLayout"; const tabs: HorizontalTabItemProps[] = [ { name: "app_store", href: "/apps", }, { name: "installed_apps", href: "/apps/installed", }, ]; function AppsSearch({ onChange, className, }: { onChange: ChangeEventHandler; className?: string; }) { const { t } = useLocale(); return ( } addOnClassname="!border-muted" containerClassName={classNames("focus:!ring-offset-0 m-1", className)} type="search" autoComplete="false" onChange={onChange} placeholder={t("search")} /> ); } export type PageProps = inferSSRProps; export default function Apps({ categories, appStore, userAdminTeams }: PageProps) { const { t } = useLocale(); const [searchText, setSearchText] = useState(undefined); return ( (
setSearchText(e.target.value)} />
)} headerClassName="sm:hidden lg:block hidden" emptyStore={!appStore.length}>
{!searchText && ( <> )} category.name)} userAdminTeams={userAdminTeams} />
); } export const LayoutWrapper = (page: React.ReactElement) => { const { t } = useLocale(); return ( {page} ); };