Skip to content

Commit

Permalink
Feat(InstagramArea): 바로가기 버튼 추가, 컴포넌트명 변경
Browse files Browse the repository at this point in the history
- radix ui 바로가기 아이콘
- Instagram → InstagramArea
  • Loading branch information
joojjang committed Dec 23, 2024
1 parent 07a0223 commit 320740c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/(main)/event/_components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ export * from './carousel'
export * from './create-post-button'
export * from './gallery'
export * from './hero'
export * from './instagram'
export * from './instagram-area'
export * from './post-list'
export * from './view-selector'
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useEffect, useState } from 'react'
import { OpenInNewWindowIcon } from '@radix-ui/react-icons'
import Image from 'next/image'

export const Instagram = () => {
export const InstagramArea = () => {
const [itemCount, setItemCount] = useState(12)

useEffect(() => {
Expand All @@ -17,11 +17,9 @@ export const Instagram = () => {
}
}

// 초기화 및 이벤트 리스너 설정
updateItemCount()
window.addEventListener('resize', updateItemCount)

// 이벤트 리스너 정리
return () => {
window.removeEventListener('resize', updateItemCount)
}
Expand Down
1 change: 1 addition & 0 deletions src/app/(main)/event/_components/instagram-area/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { InstagramArea as EventInstagramArea } from './InstagramArea'
1 change: 0 additions & 1 deletion src/app/(main)/event/_components/instagram/index.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/(main)/event/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
EventBoardHero,
EventGallery,
EventHero,
EventInstagram,
EventInstagramArea,
EventPostList,
EventViewSelector,
} from './_components'
Expand All @@ -33,7 +33,7 @@ const EventPage = () => {
<CreateEventPostButton />
</div>
</div>
<EventInstagram />
<EventInstagramArea />
</div>
)
}
Expand Down

0 comments on commit 320740c

Please sign in to comment.