Skip to content

Commit

Permalink
fix: hidden header should show again when searching [LIVE-13727]
Browse files Browse the repository at this point in the history
  • Loading branch information
Justkant committed Aug 20, 2024
1 parent 935ce9f commit aa0126a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chilled-bikes-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

fix: hidden header should show again when searching
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import { View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import type { SearchProps } from "LLM/features/Web3Hub/types";
Expand All @@ -13,6 +13,11 @@ export default function Web3HubSearch({ navigation }: SearchProps) {
const [search, setSearch] = useState("");
const { layoutY, scrollHandler } = useScrollHandler(TOTAL_HEADER_HEIGHT);

// Reset the layoutY value when search changes
useEffect(() => {
layoutY.value = 0;
}, [layoutY, search]);

return (
<SafeAreaView edges={edges} style={{ flex: 1 }}>
<Header navigation={navigation} onSearch={setSearch} layoutY={layoutY} />
Expand Down

0 comments on commit aa0126a

Please sign in to comment.