Skip to content

Commit

Permalink
chore: minor UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MounirDhahri committed Oct 28, 2024
1 parent 6030ff1 commit da45c6a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/app/AppRegistry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ export const modules = defineModules({
hidesBackButton: true,
}),
ConsignmentInquiry: reactModule(ConsignmentInquiryScreen, {
alwaysPresentModally: true,
screenOptions: {
gestureEnabled: false,
},
Expand Down
2 changes: 1 addition & 1 deletion src/app/Navigation/AuthenticatedRoutes/SharedRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const SharedRoutes = (): JSX.Element => {
// when no header is visible, we want to make sure we are bound by the insets
isHeaderShown(module)

const hidesBottomTabs = module.options.hidesBottomTabs
const hidesBottomTabs = module.options.hidesBottomTabs || isModalScreen(module)

return (
<ScreenWrapper fullBleed={isFullBleed} hidesBottomTabs={hidesBottomTabs}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Flex, Text } from "@artsy/palette-mobile"
import { themeGet } from "@styled-system/theme-get"
import { navigate } from "app/system/navigation/navigate"
import { switchTab } from "app/system/navigation/navigate"
import { useArtworkInquiryContext } from "app/utils/ArtworkInquiry/ArtworkInquiryStore"
import { useScreenDimensions } from "app/utils/hooks"
import React, { useEffect } from "react"
Expand Down Expand Up @@ -28,7 +28,7 @@ export const InquirySuccessNotification: React.FC = () => {

const navigateToConversation = () => {
dispatch({ type: "setSuccessNotificationVisible", payload: false })
navigate("inbox")
switchTab("inbox")
}

const handleRequestClose = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { act, fireEvent } from "@testing-library/react-native"
import { goBack, navigate } from "app/system/navigation/navigate"
import { goBack, switchTab } from "app/system/navigation/navigate"
import { renderWithWrappers } from "app/utils/tests/renderWithWrappers"
import { OfferSubmittedModal } from "./OfferSubmittedModal"

jest.mock("app/system/navigation/navigate", () => ({
navigate: jest.fn(),
goBack: jest.fn(),
switchTab: jest.fn(),
}))

let callback: undefined | (([...args]: any) => void)
Expand Down Expand Up @@ -37,6 +38,6 @@ describe("OfferSubmittedModal", () => {
act(() => callback?.({ orderCode: "1234", message: "Test message" }))

fireEvent.press(getAllByText("Go to inbox")[0])
expect(navigate).toHaveBeenCalledWith("inbox")
expect(switchTab).toHaveBeenCalledWith("inbox")
})
})
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Box, Text, Button } from "@artsy/palette-mobile"
import { Box, Button, Text } from "@artsy/palette-mobile"
import { NavigationContainer } from "@react-navigation/native"
import { FancyModal } from "app/Components/FancyModal/FancyModal"
import { FancyModalHeader } from "app/Components/FancyModal/FancyModalHeader"
import { goBack, navigate } from "app/system/navigation/navigate"
import { goBack, switchTab } from "app/system/navigation/navigate"
import { useSetWebViewCallback } from "app/utils/useWebViewEvent"
import React, { useState } from "react"

Expand All @@ -20,7 +20,7 @@ export const OfferSubmittedModal: React.FC = (props) => {
)

const onGoToInbox = () => {
navigate("inbox")
switchTab("inbox")
setVisible(false)
}

Expand Down

0 comments on commit da45c6a

Please sign in to comment.