tweak state usage

This commit is contained in:
Ammar Ahmed
2022-06-15 19:07:09 +05:00
parent 5ffcccf70b
commit 6b52ab81d2

View File

@@ -17,7 +17,7 @@ export const Header = React.memo(
const insets = useSafeAreaInsets();
const [hide, setHide] = useState(true);
const selectionMode = useSelectionStore(state => state.selectionMode);
const currentScreen = useNavigationStore(state => state.currentScreen);
const currentScreen = useNavigationStore(state => state.currentScreen?.name);
const onScroll = data => {
if (data.y > 150) {
@@ -51,7 +51,7 @@ export const Header = React.memo(
}
]}
>
{currentScreen.name === 'Search' ? (
{currentScreen === 'Search' ? (
<SearchBar />
) : (
<>