Skip to content

Commit

Permalink
feat: FeedMainPage closeKebab 추가
Browse files Browse the repository at this point in the history
useEffect의 클린업 기능을 사용해, FeedMainPage가 언마운트 될 시 kebab메뉴가 닫히도록 했습니다.
  • Loading branch information
Legitgoons committed May 29, 2024
1 parent dc7373a commit 0a633c3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/pages/feed-main/ui/FeedMainPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import { useEffect } from 'react';

import { useFeedKebabStore } from '@/widgets/feed-kebab';
import { FeedMainHeader } from '@/widgets/feed-main-header';
import { FeedMainList } from '@/widgets/feed-main-list';
import './FeedMainPage.scss';

export const FeedMainPage = () => {
useEffect(() => {
return () => {
useFeedKebabStore.getState().closeKebab();
};
}, []);

return (
<main className='feed-main-page'>
<FeedMainHeader />
Expand Down

0 comments on commit 0a633c3

Please sign in to comment.