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

Budget success attestation modal #177

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
21 changes: 12 additions & 9 deletions app/allocation/[category]/attestation/AttestationSuccessModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,24 @@ const AttestationSuccessModal: React.FC<Props> = ({ link, onClose }) => {
<p className="text-gray-400">
It&#39;s time to celebrate! Your votes have been attested successfully.
</p>
<p className="text-gray-400">
You can update your ballot on Optimism.
</p>
</div>
<div>
<div onClick={() => setHideAttestation(true)}>
<UpdateBallotButton closeAttestationModal={() => onClose()} />
</div>
</div>
<div>
<div>
<div className="flex justify-center">
<button
className="hover:bg-primary-dark w-[270px] rounded-lg bg-primary px-4 py-3 font-medium text-white shadow-md transition-all duration-200"
onClick={onClose}
>
Ok
</button>
</div>
</div>
</div>
<a href={link} className="w-full" target="_blank">
<button
className="text-primary underline"
Expand All @@ -49,12 +58,6 @@ const AttestationSuccessModal: React.FC<Props> = ({ link, onClose }) => {
</button>
</a>

<button
className="text-gray-600"
onClick={onClose}
>
Close
</button>
</div>
);
};
Expand Down
11 changes: 0 additions & 11 deletions app/utils/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { FC, ReactNode, useEffect, useState } from 'react';
import ReactDOM from 'react-dom';
import { XCloseIcon } from '@/public/assets/icon-components/XClose';

interface ModalProps {
isOpen: boolean
Expand Down Expand Up @@ -38,16 +37,6 @@ const Modal: FC<ModalProps> = ({
return ReactDOM.createPortal(
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50">
<div className="relative w-fit rounded-lg bg-white shadow-lg">
{showCloseButton && (
<div className="absolute right-5 top-5 z-10">
<button
onClick={onClose}
className="text-lg text-gray-400 hover:text-gray-600"
>
<XCloseIcon />
</button>
</div>
)}
{children}
</div>
</div>,
Expand Down