Skip to content

Commit

Permalink
Merge pull request #115 from DDD-Community/feature/junseub-qa
Browse files Browse the repository at this point in the history
[QA] 3차 QA
  • Loading branch information
junseublim authored Sep 6, 2024
2 parents c2f5f03 + e4e570e commit 56a3012
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 12 deletions.
4 changes: 4 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ const nextConfig = {
protocol: 'https',
hostname: 'polabo-contents.s3.ap-northeast-2.amazonaws.com',
},
{
protocol: 'https',
hostname: 'd3l8obr3u6wg96.cloudfront.net'
}
],
},
webpack: (config) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const ModalOverlay = ({

return (
<div
className={`fixed inset-0 z-20 flex items-center justify-center bg-gray-900/60 ${
className={`fixed inset-0 z-20 flex touch-pinch-zoom items-center justify-center overflow-hidden bg-gray-900/60 ${
isVisible ? 'opacity-100' : 'opacity-0'
}`}
onClick={handleClick}
Expand Down
29 changes: 21 additions & 8 deletions src/components/Polaroid/Base/PolaroidImage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { FILTERS } from '@/lib'
import { useEffect, useState } from 'react'
import { getImageWidthHeight } from '@/lib/utils/image'
import Image from 'next/image'

interface PolaroidImageProps {
imageUrl: string
Expand All @@ -26,14 +27,26 @@ const PolaroidImage = ({ imageUrl }: PolaroidImageProps) => {
}

return (
<div
className={aspectRatio}
style={{
background: `radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.02) 15%, rgba(0, 0, 0, 0.15) 100%), url(${imageUrl}) lightgray 50% / cover no-repeat`,
boxShadow: '0px 1px 2px 0px rgba(0, 0, 0, 0.10) inset',
filter: FILTERS.POLAROID,
}}
/>
<div className="relative h-auto w-auto">
<div
className="absolute bottom-0 left-0 right-0 top-0 z-50"
style={{
background: `radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.02) 15%, rgba(0, 0, 0, 0.15) 100%)`,
boxShadow: '0px 1px 2px 0px rgba(0, 0, 0, 0.10) inset',
}}
/>
<Image
src={imageUrl}
alt="폴라로이드 이미지"
width={1000}
height={1000}
quality={100}
className={`${aspectRatio} object-cover`}
style={{
filter: FILTERS.POLAROID,
}}
/>
</div>
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Polaroid/PolaroidDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const PolaroidDetailModal = ({

return (
<Modal isOpen={isOpen} onClose={onClose}>
<PolaroidFrame className="mx-auto flex w-[272px] flex-col overflow-y-hidden">
<PolaroidFrame className="mx-auto flex w-[272px] touch-pinch-zoom flex-col overflow-y-hidden">
<div className="mt-5 px-3">
<PolaroidImage imageUrl={polaroid.imageUrl} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Polaroid/PolaroidMaker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const PolaroidMaker = ({
}

return (
<PolaroidFrame className="mx-auto flex w-[272px] flex-col overflow-y-hidden">
<PolaroidFrame className="mx-auto flex w-[272px] touch-pinch-zoom flex-col overflow-y-hidden">
<div className="mt-5 px-3">
<PolaroidImageInput
imageUrl={previewFile}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/constants/polaroidConfig.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const FILTERS = {
NORMAL: 'none',
POLAROID: 'sepia(0.1) contrast(1.2) brightness(1.05) saturate(1.0) blur(0px)',
POLAROID: 'sepia(0.2) contrast(1.0) brightness(1) saturate(1.2) blur(0px)',
VINTAGE:
'sepia(0.4) contrast(1.1) brightness(0.9) saturate(0.8) hue-rotate(-20deg) blur(0.6px)',
} as const

0 comments on commit 56a3012

Please sign in to comment.