TelegramPWA/src/global/selectors/globalSearch.ts

12 lines
359 B
TypeScript

import type { GlobalState, TabArgs } from '../types';
import { getCurrentTabId } from '../../util/establishMultitabRole';
import { selectTabState } from './tabs';
export function selectCurrentGlobalSearchQuery<T extends GlobalState>(
global: T,
...[tabId = getCurrentTabId()]: TabArgs<T>
) {
return selectTabState(global, tabId).globalSearch.query;
}