Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
MounirDhahri committed Nov 13, 2024
1 parent 2be954f commit e893df0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { SearchModalScreen } from "app/Scenes/SearchModal/SeachModal"
import { GlobalSearchInput } from "app/Components/GlobalSearchInput"
import { renderWithWrappers } from "app/utils/tests/renderWithWrappers"

describe("SeachModal", () => {
describe("GlobalSearchInput", () => {
it("renders the search label properly", () => {
renderWithWrappers(<SearchModalScreen />)
renderWithWrappers(<GlobalSearchInput />)

expect(/Search artists, artworks, etc/).toBeTruthy()
})
Expand Down
5 changes: 3 additions & 2 deletions src/app/Components/GlobalSearchInput.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Flex, RoundSearchInput, Touchable } from "@artsy/palette-mobile"
import { GlobalSearchInputModal } from "app/Components/GlobalSearchInputModal"
import { GlobalSearchInputOverlay } from "app/Components/GlobalSearchInputOverlay"
import { SEARCH_INPUT_PLACEHOLDER } from "app/Scenes/Search/Search"
import { Fragment, useState } from "react"

export const GlobalSearchInput: React.FC<{}> = () => {
const [isVisible, setIsVisible] = useState(false)

return (
<Fragment>
<Touchable
Expand All @@ -23,7 +24,7 @@ export const GlobalSearchInput: React.FC<{}> = () => {
/>
</Flex>
</Touchable>
<GlobalSearchInputModal visible={isVisible} hideModal={() => setIsVisible(false)} />
<GlobalSearchInputOverlay visible={isVisible} hideModal={() => setIsVisible(false)} />
</Fragment>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { SEARCH_INPUT_PLACEHOLDER } from "app/Scenes/Search/Search"
import { SafeAreaView } from "react-native-safe-area-context"
import { FullWindowOverlay } from "react-native-screens"

export const GlobalSearchInputModal: React.FC<{ visible: boolean; hideModal: () => void }> = ({
export const GlobalSearchInputOverlay: React.FC<{ visible: boolean; hideModal: () => void }> = ({
visible,
hideModal,
}) => {
Expand Down
27 changes: 0 additions & 27 deletions src/app/Scenes/SearchModal/SeachModal.tsx

This file was deleted.

0 comments on commit e893df0

Please sign in to comment.