Skip to content

Commit

Permalink
fix: hide Transak window when drawer is open (#2118)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicole O'Brien <[email protected]>
  • Loading branch information
jeeanribeiro and nicole-obrien authored Mar 12, 2024
1 parent fef4ae4 commit 8dd6453
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,24 @@
TransakWindowPlaceholder,
} from '../components'
import { isDashboardSideBarExpanded } from '@core/ui'
import { DrawerState } from '@desktop/auxiliary/drawer/types'
import { drawerState } from '@desktop/auxiliary/drawer/stores'
$: $isDashboardSideBarExpanded, void updateTransakBounds()
$: if ($selectedAccountIndex !== undefined) {
void resetTransak()
}
$: void handlePopupState($popupState, $profileAuthPopup, $settingsState)
$: void handleOverlayChanges($popupState, $profileAuthPopup, $settingsState, $drawerState)
async function handlePopupState(
async function handleOverlayChanges(
state: IPopupState,
profilePopupState: IProfileAuthPopupState,
settingsState: ISettingsState
settingsState: ISettingsState,
drawerState: DrawerState
): Promise<void> {
if (state.active || profilePopupState.active || settingsState.open) {
if (state.active || profilePopupState.active || settingsState.open || drawerState?.id) {
await Platform.hideTransak()
} else {
await tick()
Expand Down

0 comments on commit 8dd6453

Please sign in to comment.