Skip to content

Commit

Permalink
feat: thread the id all the way through to confirmation screen
Browse files Browse the repository at this point in the history
  • Loading branch information
anandaroop committed Oct 4, 2023
1 parent fed027b commit 3f6b819
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,20 @@ export interface CreateSavedSearchModalProps {
closeModal: () => void
onComplete?: () => void
contextModule?: ContextModule
currentArtworkID?: string
}

export const CreateSavedSearchModal: React.FC<CreateSavedSearchModalProps> = (props) => {
const { visible, entity, attributes, aggregations, closeModal, onComplete, contextModule } = props
const {
visible,
entity,
attributes,
aggregations,
closeModal,
onComplete,
contextModule,
currentArtworkID,
} = props
const tracking = useTracking()

useEffect(() => {
Expand All @@ -54,6 +64,7 @@ export const CreateSavedSearchModal: React.FC<CreateSavedSearchModalProps> = (pr
aggregations,
attributes,
entity,
currentArtworkID,
onClosePress: () => {
onComplete?.() // close the filter modal stack (if coming from artist artwork grid)
closeModal() // close the alert modal stack
Expand Down
3 changes: 2 additions & 1 deletion src/app/Scenes/SavedSearchAlert/CreateSavedSearchAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Stack = createStackNavigator<CreateSavedSearchAlertNavigationStack>()

export const CreateSavedSearchAlert: React.FC<CreateSavedSearchAlertProps> = (props) => {
const { visible, params } = props
const { attributes, aggregations, entity } = params
const { attributes, aggregations, entity, currentArtworkID } = params

return (
<SavedSearchStoreProvider
Expand All @@ -29,6 +29,7 @@ export const CreateSavedSearchAlert: React.FC<CreateSavedSearchAlertProps> = (pr
attributes: attributes as SearchCriteriaAttributes,
aggregations,
entity,
currentArtworkID,
}}
>
<NavigationContainer independent>
Expand Down
1 change: 1 addition & 0 deletions src/app/Scenes/SavedSearchAlert/SavedSearchAlertModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface CreateSavedSearchAlertParams {
aggregations: Aggregations
attributes: SearchCriteriaAttributes
entity: SavedSearchEntity
currentArtworkID?: string
onClosePress: () => void
onComplete: (response: SavedSearchAlertMutationResult) => void
}
Expand Down

0 comments on commit 3f6b819

Please sign in to comment.