File tree Expand file tree Collapse file tree 4 files changed +7
-17
lines changed Expand file tree Collapse file tree 4 files changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import './styles/guided-workflow.css';
77import './styles/wallet-connection-guide.css' ;
88
99// Import components
10- import { AppContext } from './AppContext' ;
10+ import { AppContext } from './contexts/ AppContext' ;
1111import { NetworkSelector } from './components/NetworkSelector' ;
1212import { OfferCreation } from './components/OfferCreation' ;
1313import { OfferList } from './components/OfferList' ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import React , { useContext } from 'react' ;
2- import { AppContext } from '../AppContext' ;
2+ import { AppContext } from '../contexts/ AppContext' ;
33import { usePhantomWallet } from '../contexts/PhantomWalletProvider' ;
44
55/**
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ export const Toast = ({
2424 const [ isVisible , setIsVisible ] = useState ( true ) ;
2525 const [ progress , setProgress ] = useState ( 100 ) ;
2626
27+ const handleClose = useCallback ( ( ) => {
28+ setIsVisible ( false ) ;
29+ setTimeout ( ( ) => onClose ?. ( ) , 300 ) ; // Allow fade out animation
30+ } , [ onClose ] ) ;
31+
2732 useEffect ( ( ) => {
2833 if ( duration > 0 ) {
2934 const interval = setInterval ( ( ) => {
@@ -42,11 +47,6 @@ export const Toast = ({
4247 }
4348 } , [ duration , handleClose ] ) ;
4449
45- const handleClose = useCallback ( ( ) => {
46- setIsVisible ( false ) ;
47- setTimeout ( ( ) => onClose ?. ( ) , 300 ) ; // Allow fade out animation
48- } , [ onClose ] ) ;
49-
5050 const getToastIcon = ( ) => {
5151 switch ( type ) {
5252 case 'success' :
You can’t perform that action at this time.
0 commit comments