Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove going back on modal close #79

Merged
merged 3 commits into from
Apr 3, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 9 additions & 18 deletions frontend/components/modal/ErrorModal.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { Button } from '@components/buttons/Button'
import { ModalWrapper } from '@components/modal/ModalWrapper'
import { useRouter } from 'next/navigation'

export function ErrorModal({ showModal }: { showModal: Function }) {
const router = useRouter()
return (
<ModalWrapper>
<div className="w-full max-w-[600px] divide-y divide-white divide-opacity-25 border border-white border-opacity-25 bg-black bg-opacity-50 text-center">
Expand All @@ -13,31 +11,24 @@ export function ErrorModal({ showModal }: { showModal: Function }) {
<div className="p-6">
<p className="mx-auto max-w-[350px] text-[15px] tracking-[.3px]">
Solana is currently experiencing congestion and was unable to
include your transaction. Please try again in a few minutes
include at least one of your transactions. Please try again in a few
minutes
</p>
<br />
<p className="mx-auto max-w-[350px] text-[15px] tracking-[.3px]">
<i>
You can see which transactions failed when you close this popup
</i>
</p>
</div>
<div className="bg-black bg-opacity-50 px-10 py-8">
<Button
type={'primary'}
onClick={() => {
showModal(false)
router.back()
}}
>
<span className="flex items-center gap-2">
Try again
<svg
width={13}
height={9}
viewBox="0 0 13 9"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8.13445 8.97557L13 4.4995L8.13445 0.0234376L7.11722 0.959101L10.2404 3.83123L4.43299e-08 3.83123L5.98891e-08 5.16772L10.2404 5.16772L7.11722 8.03985L8.13445 8.97557Z"
fill="currentColor"
/>
</svg>
</span>
<span className="flex items-center gap-2">Close</span>
</Button>
</div>
</div>
Expand Down
Loading