Skip to content

Commit

Permalink
add url search param to open mint
Browse files Browse the repository at this point in the history
  • Loading branch information
probablyangg committed Jun 7, 2024
1 parent 3f2443a commit 761cae2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/dapp/src/components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import { useSearchParams } from 'react-router-dom'
import { SliderContext } from '../contexts/Slider'
import { useContext } from 'react'
import { useContext, useEffect } from 'react'

const Footer = () => {
const slider = useContext(SliderContext)
const [params] = useSearchParams();
const toOpenMint = params.get('mint');
useEffect(() => {
if (toOpenMint) {
slider.dispatch({ type: 'open' })
}
}, [])
return (
<>
<div className='
Expand Down

0 comments on commit 761cae2

Please sign in to comment.