Search custom feeds (#1031)

* paginate custom feeds

* basic search

* update `@atproto/api`

* use search from the API

* debounce search for 200ms
This commit is contained in:
Ansh 2023-07-28 08:29:37 -07:00 committed by GitHub
parent 8e9b8b6b36
commit 38d78e16bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 81 additions and 18 deletions

View file

@ -21,6 +21,7 @@ interface Props {
onPressClearQuery: () => void
onPressCancelSearch: () => void
onSubmitQuery: () => void
showMenu?: boolean
}
export function HeaderWithInput({
isInputFocused,
@ -30,6 +31,7 @@ export function HeaderWithInput({
onPressClearQuery,
onPressCancelSearch,
onSubmitQuery,
showMenu = true,
}: Props) {
const store = useStores()
const theme = useTheme()
@ -49,16 +51,18 @@ export function HeaderWithInput({
return (
<View style={[pal.view, pal.border, styles.header]}>
<TouchableOpacity
testID="viewHeaderBackOrMenuBtn"
onPress={onPressMenu}
hitSlop={MENU_HITSLOP}
style={styles.headerMenuBtn}
accessibilityRole="button"
accessibilityLabel="Menu"
accessibilityHint="Access navigation links and settings">
<FontAwesomeIcon icon="bars" size={18} color={pal.colors.textLight} />
</TouchableOpacity>
{showMenu ? (
<TouchableOpacity
testID="viewHeaderBackOrMenuBtn"
onPress={onPressMenu}
hitSlop={MENU_HITSLOP}
style={styles.headerMenuBtn}
accessibilityRole="button"
accessibilityLabel="Menu"
accessibilityHint="Access navigation links and settings">
<FontAwesomeIcon icon="bars" size={18} color={pal.colors.textLight} />
</TouchableOpacity>
) : null}
<View
style={[
{backgroundColor: pal.colors.backgroundLight},