Skip to content

Commit dc27ff7

Browse files
committed
next.js 수정
1 parent da60f41 commit dc27ff7

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

next.config.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ const nextConfig: NextConfig = {
55
scrollRestoration: false,
66
},
77
images: {
8-
domains: ['team2-app-s3-bucket.s3.ap-northeast-2.amazonaws.com'],
8+
// 외부 이미지 최적화 완전 비활성화 (Vercel 유료 기능 회피)
9+
unoptimized: true,
10+
domains: [
11+
'team2-app-s3-bucket.s3.ap-northeast-2.amazonaws.com',
12+
'team2-app-s3-bucket.s3.amazonaws.com',
13+
],
914
remotePatterns: [
1015
{
1116
protocol: 'https',
1217
hostname: 'www.thecocktaildb.com',
1318
},
1419
],
15-
qualities: [25, 50, 75, 90, 100],
1620
},
1721
env: {
1822
NPUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,

src/domains/main/cocktailDrop/CocktailDrop.tsx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import Image from 'next/image';
44
import Cocktailcup from '../../../../public/CocktailDrop.webp';
5-
import { useLayoutEffect, useRef, useState } from 'react';
5+
import { useLayoutEffect, useRef } from 'react';
66
import gsap from 'gsap';
77
import { ScrollTrigger } from 'gsap/all';
88
import PassBtn from './PassBtn';
@@ -44,21 +44,6 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
4444
}
4545
);
4646

47-
const cupElement = cupRef.current;
48-
const logoElement = logoRef.current;
49-
50-
if (!cupElement || !logoElement) return;
51-
52-
const cupRect = cupElement.getBoundingClientRect();
53-
const logoRect = logoElement.getBoundingClientRect();
54-
55-
// container 기준 상대 위치 계산
56-
const containerTop = containerRef.current?.getBoundingClientRect().top || 0;
57-
const cupTopRelative = cupRect.top - containerTop + 10;
58-
console.log('containerTop', containerTop);
59-
console.log('cupTopRelative', cupTopRelative);
60-
console.log('logoRect.height', logoRect.height);
61-
6247
const getFinalY = (width: number): number => {
6348
if (width >= 1800) return 200;
6449
if (width >= 1400) return 10;

0 commit comments

Comments
 (0)