mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-23 16:13:04 +00:00
- CampaignHomeSearchChromeContext + publisher no Início - CampaignMobileTopBar troca SidebarTrigger por Voltar quando uiFocused - useHomeSearchFocusHistory com pushState/popstate para back do SO - HomeSearchSuggestSkeleton enquanto isFetching sem hits - Unit tests para history helper, top bar e skeleton Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
28 lines
964 B
TypeScript
28 lines
964 B
TypeScript
import { Skeleton } from '@/components/ui/skeleton'
|
|
import { HOME_SEARCH_HIT_ROW_WRAPPER_CLASS } from '@/lib/homeSearchUi'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
const HOME_SEARCH_SUGGEST_SKELETON_ROW_COUNT = 3
|
|
|
|
const HomeSearchSuggestSkeletonRow = () => (
|
|
<div className={cn(HOME_SEARCH_HIT_ROW_WRAPPER_CLASS, 'flex min-h-11 items-center gap-3 py-2.5')}>
|
|
<div className="min-w-0 flex-1 space-y-1.5">
|
|
<Skeleton className="h-4 w-3/5 max-w-[12rem]" />
|
|
<Skeleton className="h-3 w-2/5 max-w-[8rem]" />
|
|
</div>
|
|
</div>
|
|
)
|
|
|
|
/** B106 — placeholder rows while suggest/search hits are still loading. */
|
|
export const HomeSearchSuggestSkeleton = () => (
|
|
<div
|
|
data-slot="home-search-suggest-skeleton"
|
|
data-testid="home-search-suggest-skeleton"
|
|
className="flex flex-col"
|
|
aria-hidden
|
|
>
|
|
{Array.from({ length: HOME_SEARCH_SUGGEST_SKELETON_ROW_COUNT }, (_, index) => (
|
|
<HomeSearchSuggestSkeletonRow key={index} />
|
|
))}
|
|
</div>
|
|
)
|