feat(web): remember search context (#16614)

* Retain search context in LocalStorage.

* Remove debug logging

* Prettier

* Added QueryType and VALID_QUERY_TYPES to $lib/constants

* Prettier

* Renamed VALID_QUERY_TYPES to fit the codestyle.

Ran prettier

* show current search type on search bar

* fix: linting

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Adam O'neill 2025-03-10 03:20:25 +00:00 committed by GitHub
parent 2f8e89c7ec
commit 70a08707d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 83 additions and 4 deletions

View file

@ -119,6 +119,14 @@ export const fallbackLocale = {
name: 'English (US)',
};
export enum QueryType {
SMART = 'smart',
METADATA = 'metadata',
DESCRIPTION = 'description',
}
export const validQueryTypes = new Set([QueryType.SMART, QueryType.METADATA, QueryType.DESCRIPTION]);
export const locales = [
{ code: 'af-ZA', name: 'Afrikaans (South Africa)' },
{ code: 'sq-AL', name: 'Albanian (Albania)' },