@@ -15,7 +15,7 @@ import { TeamJoinModal } from '@/components/features/TeamDashboard/TeamJoinModal
1515import { TopicDetail } from '@/components/features/TeamDashboard/TopicDetail' ;
1616import { useScrollUpButtonPosition } from '@/components/features/TeamDashboard/hooks/useScrollUpButtonPosition.ts' ;
1717
18- import { Fragment , useState } from 'react' ;
18+ import { Fragment , useEffect , useState } from 'react' ;
1919import { useParams } from 'react-router-dom' ;
2020
2121import { IArticle , getArticlesByDate } from '@/api/dashboard' ;
@@ -46,6 +46,11 @@ const TeamDashboardPage = () => {
4646 const [ selectedArticleId , setSelectedArticleId ] = useAtom ( selectedPostIdAtom ) ;
4747 const [ isModalOpen , setIsModalOpen ] = useState ( false ) ;
4848
49+ useEffect ( ( ) => {
50+ setSelectedArticleId ( null ) ;
51+ setCurrentView ( null ) ;
52+ } , [ teamId ] ) ;
53+
4954 const { boundRef, buttonRef, onClickJump } = useScrollUpButtonPosition ( ) ;
5055
5156 const { tagsMap, myTeamResponse, isTeamManager, isPending } =
@@ -72,6 +77,8 @@ const TeamDashboardPage = () => {
7277 const onClickCalendarDate = ( newDate : string ) => {
7378 setSelectedDate ( newDate ) ;
7479 setPage ( 0 ) ;
80+ setSelectedArticleId ( null ) ;
81+ setCurrentView ( null ) ;
7582 } ;
7683
7784 const handleShowTopicDetail = ( ) => {
0 commit comments