Skip to content

Commit

Permalink
refactor: use hook instead of props for receiving route params
Browse files Browse the repository at this point in the history
To ease test-writing
  • Loading branch information
anandaroop committed Jul 12, 2023
1 parent ec9f815 commit 4ca6d6f
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Box, Button, Flex, Spacer, Text, useTheme } from "@artsy/palette-mobile"
import { RouteProp, useRoute } from "@react-navigation/native"
import { StackScreenProps } from "@react-navigation/stack"
import {
ConfirmationScreenMatchingArtworksQuery,
FilterArtworksInput,
Expand All @@ -22,10 +21,8 @@ import { graphql, useLazyLoadQuery } from "react-relay"

const NUMBER_OF_ARTWORKS_TO_SHOW = 10

type Props = StackScreenProps<CreateSavedSearchAlertNavigationStack, "ConfirmationScreen">

export const ConfirmationScreen: React.FC<Props> = (props) => {
const { route } = props
export const ConfirmationScreen: React.FC = () => {
const route = useRoute<RouteProp<CreateSavedSearchAlertNavigationStack, "ConfirmationScreen">>()
const { closeModal } = route.params
const { bottom: bottomInset } = useSafeAreaInsets()
const pills = useSavedSearchPills()
Expand Down

0 comments on commit 4ca6d6f

Please sign in to comment.