mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 06:43:06 +00:00
chore: remove dead searchOnlyListOmnibox exports (knip)
This commit is contained in:
parent
be4de299b1
commit
cf18f4084d
1 changed files with 1 additions and 33 deletions
|
|
@ -2,11 +2,7 @@
|
|||
* Degenerate omnibox for lists that only expose free-text search (B128:
|
||||
* organizações). Pure / client-safe.
|
||||
*/
|
||||
import {
|
||||
filterOmniboxSuggestionSeeds,
|
||||
type CampaignListOmniboxChip,
|
||||
type CampaignListOmniboxSuggestion,
|
||||
} from '@/lib/campaignListOmnibox'
|
||||
import { type CampaignListOmniboxChip } from '@/lib/campaignListOmnibox'
|
||||
|
||||
export type SearchOnlyListState = {
|
||||
q?: string
|
||||
|
|
@ -23,9 +19,6 @@ export const buildSearchOnlyOmniboxChips = (
|
|||
state: SearchOnlyListState,
|
||||
): CampaignListOmniboxChip[] => (state.q ? [{ id: 'q', label: chipLabel('Busca', state.q) }] : [])
|
||||
|
||||
export const buildSearchOnlyOmniboxSuggestions = (query: string): CampaignListOmniboxSuggestion[] =>
|
||||
filterOmniboxSuggestionSeeds([], query)
|
||||
|
||||
export const applySearchOnlyOmniboxSuggestion = <T extends SearchOnlyListState>({
|
||||
state,
|
||||
suggestionId,
|
||||
|
|
@ -41,28 +34,3 @@ export const applySearchOnlyOmniboxSuggestion = <T extends SearchOnlyListState>(
|
|||
}
|
||||
return { kind: 'url', state }
|
||||
}
|
||||
|
||||
export const removeSearchOnlyOmniboxChip = <T extends SearchOnlyListState>({
|
||||
state,
|
||||
chipId,
|
||||
withPageReset,
|
||||
}: {
|
||||
state: T
|
||||
chipId: string
|
||||
withPageReset: (next: T) => T
|
||||
}): SearchOnlyOmniboxAction<T> => {
|
||||
if (chipId === 'q') {
|
||||
return { kind: 'url', state: withPageReset({ ...state, q: undefined }) }
|
||||
}
|
||||
return { kind: 'url', state }
|
||||
}
|
||||
|
||||
export const clearSearchOnlyOmnibox = <T extends SearchOnlyListState>({
|
||||
cleared,
|
||||
}: {
|
||||
state: T
|
||||
cleared: T
|
||||
}): SearchOnlyOmniboxAction<T> => ({
|
||||
kind: 'clear',
|
||||
state: cleared,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue