File tree 1 file changed +20
-1
lines changed
src/frontend/src/pages/FriendsPage
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 1
1
import CategorySection from '@/pages/FriendsPage/components/CategorySection' ;
2
+ import { useGuildInfoStore } from '@/stores/guildInfo' ;
2
3
3
4
import GuildList from '../../components/guild/GuildList' ;
5
+ import VideoPage from '../VideoPage' ;
4
6
5
7
import ChattingSection from './components/ChattingSection' ;
6
8
import * as S from './styles' ;
7
9
8
10
const FriendsPage = ( ) => {
11
+ const { guildId } = useGuildInfoStore ( ) ;
12
+
13
+ const renderCategoryComponent = ( ) => {
14
+ const channelInfoStr = localStorage . getItem ( 'channelInfo' ) ;
15
+
16
+ if ( ! guildId ) return < ChattingSection /> ;
17
+
18
+ if ( channelInfoStr ) {
19
+ const channelData = JSON . parse ( channelInfoStr ) ;
20
+ const channelType = channelData . state . selectedChannel . type ;
21
+
22
+ if ( channelType === 'VOICE' ) return < VideoPage /> ;
23
+
24
+ // 텍스트 채널시 채팅창 주가 예정
25
+ }
26
+ } ;
27
+
9
28
return (
10
29
< S . FriendsPage >
11
30
< S . ContentContainer >
12
31
< GuildList />
13
32
< CategorySection />
14
- < ChattingSection />
33
+ { renderCategoryComponent ( ) }
15
34
</ S . ContentContainer >
16
35
</ S . FriendsPage >
17
36
) ;
You can’t perform that action at this time.
0 commit comments