Skip to content

Commit c2ed553

Browse files
authored
Refactor/LCP문제 개선 (#159)
* [refactor] 무한스크롤 tanstack * [refactor] 레시피페이지 리팩토링 * [refactor] 아코디언박스 * [feat]필터링 뒤로가기 스크롤 저장 * [chore] 머지 전 커밋 * [chore]머지 전 커밋 누락 내용 커밋 * [refactor]리팩토링 커밋 * [refactor] 정렬 중복아이템문제 * [feat] 칵테일 정렬기능 * [fix]댓글 알림 수정 * [chore] 충돌사항 수정 * [docs] 필요없는 폰트파일 정리 * [feat]sse설정 * [feat]sse알림설정 * [chore]머지후 커밋 * [style] 메인페이지 아코디언 오류 수정 * [feat]알림 SSE기능 * [chore] console.log 삭제 * [docs]마이페이지 폴더구조 정리 * [refactor] 전역상태에서 필터링 삭제 * refactor/이미지 개선 * chore/포매팅
1 parent 049fd7b commit c2ed553

File tree

23 files changed

+222
-211
lines changed

23 files changed

+222
-211
lines changed

next.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import type { NextConfig } from 'next';
22

33
const nextConfig: NextConfig = {
4+
reactStrictMode: false,
45
experimental: {
56
scrollRestoration: false,
67
},
78
images: {
89
// 외부 이미지 최적화 완전 비활성화 (Vercel 유료 기능 회피)
9-
unoptimized: true,
10+
// unoptimized: true,
1011
domains: [
1112
'team2-app-s3-bucket.s3.ap-northeast-2.amazonaws.com',
1213
'team2-app-s3-bucket.s3.amazonaws.com',
@@ -15,12 +16,14 @@ const nextConfig: NextConfig = {
1516
{
1617
protocol: 'https',
1718
hostname: 'www.thecocktaildb.com',
19+
pathname: '/images/**',
1820
},
1921
],
2022
},
2123
env: {
2224
NPUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,
2325
},
26+
2427
// webpack 설정
2528
webpack: (config) => {
2629
// @ts-expect-error 타입 에러 무시

src/app/(with-layout)/mypage/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import MyNav from '@/domains/mypage/main/MyNav';
2-
import MyProfile from '@/domains/mypage/main/MyProfile';
1+
import MyNav from '@/domains/mypage/components/main/MyNav';
2+
import MyProfile from '@/domains/mypage/components/main/MyProfile';
33
import SkeletonLayout from '@/domains/mypage/skeleton/main/SkeletonLayout';
44
import { Suspense } from 'react';
55

src/app/(with-layout)/mypage/my-setting/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import MySetting from '@/domains/mypage/main/MySetting';
2-
1+
import MySetting from '@/domains/mypage/components/main/MySetting';
32
import { Metadata } from 'next';
43
export const metadata: Metadata = {
54
title: '마이페이지',

src/domains/community/hook/useItemVirtualizer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { useVirtualizer } from '@tanstack/react-virtual';
22
import { CommentType, Post } from '../types/post';
3+
import { Cocktail } from '@/domains/recipe/types/types';
34

45
export function useItemVirtualizer(
5-
items: CommentType[] | Post[] | null,
6+
items: CommentType[] | Post[] | Cocktail[] | null,
67
parentRef: React.RefObject<HTMLElement | null>
78
) {
89
return useVirtualizer({

src/domains/mypage/main/MyAbv.tsx renamed to src/domains/mypage/components/main/MyAbv.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22
import Help from '@/shared/assets/icons/help_24.svg';
33
import ToolTip from '@/shared/components/tool-tip/ToolTip';
4-
import useMedia from '../hook/useMedia';
4+
import useMedia from '../../hook/useMedia';
55

66
function MyAbv({ abv }: { abv: number }) {
77
const isMd = useMedia('(min-width:768px)');

src/domains/mypage/main/MyNav.tsx renamed to src/domains/mypage/components/main/MyNav.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
'use client';
2-
import TabMenu from '@/domains/mypage/main/TabMenu';
2+
33
import Link from 'next/link';
44
import { usePathname } from 'next/navigation';
5+
import TabMenu from './TabMenu';
56

67
const MAIN_TABMENU = [
78
{

src/domains/mypage/main/MyProfile.tsx renamed to src/domains/mypage/components/main/MyProfile.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import AbvGraph from '@/domains/shared/components/abv-graph/AbvGraph';
44
import MyAbv from './MyAbv';
55
import SsuryImage from './SsuryImage';
6-
import useFetchProfile from '../api/fetchProfile';
6+
77
import { useQuery } from '@tanstack/react-query';
8+
import useFetchProfile from '../../api/fetchProfile';
89

910
function MyProfile() {
1011
const { fetchProfile } = useFetchProfile();

src/domains/mypage/main/MySetting.tsx renamed to src/domains/mypage/components/main/MySetting.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import ToggleBtn from '@/domains/mypage/components/ToggleBtn';
44
import WithdrawModal from '@/domains/mypage/components/WithdrawModal';
55
import TextButton from '@/shared/components/button/TextButton';
66
import { useEffect, useState } from 'react';
7-
import useFetchProfile from '../api/fetchProfile';
7+
88
import { useQuery } from '@tanstack/react-query';
9+
import useFetchProfile from '../../api/fetchProfile';
910

1011
function MySetting() {
1112
const { fetchProfile } = useFetchProfile();

src/domains/mypage/main/SsuryImage.tsx renamed to src/domains/mypage/components/main/SsuryImage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import useProfileSsury from '../hook/useProfileSsury';
21
import Image from 'next/image';
2+
import useProfileSsury from '../../hook/useProfileSsury';
33

44
function SsuryImage({ abvLevel }: { abvLevel: number }) {
55
const profileImage = useProfileSsury(abvLevel);

0 commit comments

Comments
 (0)