Skip to content

Commit

Permalink
Fix: minimize queue drawer when tx modal is opened (#2317)
Browse files Browse the repository at this point in the history
* Fix: minimize queue drawer when tx modal is opened

* 1.15.1
  • Loading branch information
katspaugh authored Jul 27, 2023
1 parent ff5f450 commit cd2e9ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"homepage": "https://github.com/safe-global/safe-wallet-web",
"license": "GPL-3.0",
"type": "module",
"version": "1.15.0",
"version": "1.15.1",
"scripts": {
"dev": "next dev",
"start": "next dev",
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/TxModalDialog/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.dialog {
top: 52px;
left: 230px;
z-index: 1201;
z-index: 3;
transition: left 225ms cubic-bezier(0, 0, 0.2, 1) 0ms;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
import { useCallback, useState } from 'react'
import { useCallback, useContext, useEffect, useState } from 'react'
import useTxQueue from '@/hooks/useTxQueue'
import { TxModalContext } from '@/components/tx-flow'

const useTransactionQueueBarState = () => {
const [expanded, setExpanded] = useState(false)
const [dismissedByUser, setDismissedByUser] = useState(false)
const { page = { results: [] } } = useTxQueue()
const { txFlow } = useContext(TxModalContext)

const dismissQueueBar = useCallback((): void => {
setDismissedByUser(true)
}, [])

useEffect(() => {
if (txFlow) setExpanded(false)
}, [txFlow])

return {
expanded,
dismissedByUser,
Expand Down

0 comments on commit cd2e9ac

Please sign in to comment.