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 (
return userInfo?.alert_message?.length > 0 ? (
<ToastContainer showTopToast={showTopToast}>
{userInfo?.alert_message?.length > 0 ? (
userInfo.alert_message
) : (
<>
<div>Logos Operators Ordinals Mint Is Live</div>
<a
href="https://ordinalsbot.com/mint/logos-operators"
target="_blank"
>
{/* <div>Logos Operators Ordinals Mint Is Live</div>
<a href="https://ordinalsbot.com/mint/logos-operators" target="_blank">
https://ordinalsbot.com/mint/logos-operators
</a>
</>
)}
</a> */}
{userInfo.alert_message}
<div>
<button className="close-button" onClick={() => setShowTopToast(false)}>
<img src="/assets/close-orange.svg" alt="close" />
</button>
</div>
</ToastContainer>
)
) : null
}
const ToastContainer = styled.div<{ showTopToast: boolean }>`

View File

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