Skip to content

Commit

Permalink
Revert "refac: photoClickWrapper click event"
Browse files Browse the repository at this point in the history
  • Loading branch information
taga3s authored Aug 7, 2024
1 parent 1646c0f commit 81ba693
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
13 changes: 4 additions & 9 deletions app/islands/PhotoClickWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,16 @@ const PhotoClickWrapper: FC<Props> = ({ children, imageUrl, imageAlt }) => {

return (
<>
<button type="button" onClick={handleClick} class={photoClickWrapperImage}>
<button type="button" onClick={() => handleClick()} class={photoClickWrapperImage}>
{children}
</button>
{isClicked && (
<div class={photoClickWrapperMask} id="photo-with-mask" onClick={handleClick}>
<button type="button" class={photoClickWrapperMaskCloseButton} onClick={handleClick}>
<div class={photoClickWrapperMask} id="photo-with-mask">
<button type="button" onClick={handleClick} class={photoClickWrapperMaskCloseButton}>
<CloseIcon />
</button>
<div class={photoClickWrapperExpandedImageContainer}>
<img
src={imageUrl}
alt={imageAlt}
class={photoClickWrapperExpandedImage}
onClick={(e) => e.stopPropagation()}
/>
<img src={imageUrl} alt={imageAlt} class={photoClickWrapperExpandedImage} />
</div>
</div>
)}
Expand Down
3 changes: 0 additions & 3 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
},
"complexity": {
"noBannedTypes": "warn"
},
"a11y": {
"useKeyWithClickEvents": "warn"
}
}
},
Expand Down

0 comments on commit 81ba693

Please sign in to comment.