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:
parent
8e9b8b6b36
commit
38d78e16bf
7 changed files with 81 additions and 18 deletions
|
@ -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},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue