chore: restore toast

This commit is contained in:
jinhojang6 2024-11-06 01:12:06 +09:00
parent af3c7bfdae
commit 236b791ef4
2 changed files with 9 additions and 16 deletions

View File

@ -45,28 +45,20 @@ const Toast: React.FC = () => {
return () => clearInterval(interval) return () => clearInterval(interval)
}, []) }, [])
return ( return userInfo?.alert_message?.length > 0 ? (
<ToastContainer showTopToast={showTopToast}> <ToastContainer showTopToast={showTopToast}>
{userInfo?.alert_message?.length > 0 ? ( {/* <div>Logos Operators Ordinals Mint Is Live</div>
userInfo.alert_message <a href="https://ordinalsbot.com/mint/logos-operators" target="_blank">
) : ( https://ordinalsbot.com/mint/logos-operators
<> </a> */}
<div>Logos Operators Ordinals Mint Is Live</div> {userInfo.alert_message}
<a
href="https://ordinalsbot.com/mint/logos-operators"
target="_blank"
>
https://ordinalsbot.com/mint/logos-operators
</a>
</>
)}
<div> <div>
<button className="close-button" onClick={() => setShowTopToast(false)}> <button className="close-button" onClick={() => setShowTopToast(false)}>
<img src="/assets/close-orange.svg" alt="close" /> <img src="/assets/close-orange.svg" alt="close" />
</button> </button>
</div> </div>
</ToastContainer> </ToastContainer>
) ) : null
} }
const ToastContainer = styled.div<{ showTopToast: boolean }>` const ToastContainer = styled.div<{ showTopToast: boolean }>`

View File

@ -1,3 +1,4 @@
import { Toast } from '@/components/Toast'
import { DefaultLayout } from '@/layouts/DefaultLayout' import { DefaultLayout } from '@/layouts/DefaultLayout'
import { css, Global } from '@emotion/react' import { css, Global } from '@emotion/react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
@ -115,7 +116,7 @@ export default function App({ Component, pageProps }: AppLayoutProps) {
} }
`} `}
/> />
{/* <Toast /> */} <Toast />
{getLayout(<Component {...pageProps} />)} {getLayout(<Component {...pageProps} />)}
</QueryClientProvider> </QueryClientProvider>
</LSDThemeProvider> </LSDThemeProvider>