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

fix: Media Modal and Remove button clash #1544

Merged
merged 1 commit into from
Jan 28, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ const RemoveFromCollectionBtn = (props: IRemoveFromCollectionBtn) => {
buttonType="primary"
buttonSize="md"
className="mb-1 mt-2 h-6 w-full text-zinc-200 shadow-md"
onClick={() => setSure(true)}
onClick={(e) => {
e.stopPropagation() // Stops the MediaModal from also showing when clicked.
setSure(true)
}}
>
{<TrashIcon className="m-auto ml-3 h-3" />}{' '}
<p className="rules-button-text m-auto mr-2">{'Remove'}</p>
Expand All @@ -54,7 +57,14 @@ const RemoveFromCollectionBtn = (props: IRemoveFromCollectionBtn) => {
buttonType="primary"
buttonSize="md"
className="mb-1 mt-2 h-6 w-full text-zinc-200 shadow-md"
onClick={props.popup ? handlePopup : handle}
onClick={(e) => {
e.stopPropagation() // Stops the MediaModal from also showing when clicked.
if (props.popup) {
handlePopup()
} else {
handle()
}
}}
>
<p className="rules-button-text m-auto mr-2">{'Are you sure?'}</p>
</Button>
Expand Down