@@ -10,10 +10,10 @@ import { GroupDetailsQuery as GroupDetailsQueryType } from '../../../../__genera
10
10
import { GroupDetailsQuery , useChatRoom } from '../../common'
11
11
import DefaultAllChatRoomsList from '../AllChatRoomsList'
12
12
import ChatRoom from '../ChatRoom'
13
- import DefaultGroupChatRoomCreate from '../GroupChatRoomCreate '
14
- import DefaultGroupChatRoomDetails from '../GroupChatRoomDetail '
15
- import DefaultGroupChatRoomEdit from '../GroupChatRoomEdit '
16
- import DefaultSingleChatRoomCreate from '../SingleChatRoomCreate '
13
+ import DefaultGroupChatCreate from '../GroupChatCreate '
14
+ import DefaultGroupChatDetails from '../GroupChatDetails '
15
+ import DefaultGroupChatEdit from '../GroupChatEdit '
16
+ import DefaultSingleChatCreate from '../SingleChatCreate '
17
17
import { LEFT_PANEL_CONTENT , LeftPanelContentValues } from './constants'
18
18
import { ChatRoomContainer , ChatRoomsContainer , ChatRoomsListContainer } from './styled'
19
19
import { ChatRoomsComponentProps } from './types'
@@ -23,14 +23,14 @@ const ChatRoomsComponent: FC<ChatRoomsComponentProps> = ({
23
23
settings,
24
24
AllChatRoomsListComponent = DefaultAllChatRoomsList ,
25
25
AllChatRoomsListComponentProps = { } ,
26
- GroupChatRoomCreateComponent = DefaultGroupChatRoomCreate ,
27
- GroupChatRoomCreateComponentProps = { } ,
28
- GroupChatRoomDetailsComponent = DefaultGroupChatRoomDetails ,
29
- GroupChatRoomDetailsComponentProps = { } ,
30
- GroupChatRoomEditComponent = DefaultGroupChatRoomEdit ,
31
- GroupChatRoomEditComponentProps = { } ,
32
- SingleChatRoomCreateComponent = DefaultSingleChatRoomCreate ,
33
- SingleChatRoomCreateComponentProps = { } ,
26
+ GroupChatCreateComponent = DefaultGroupChatCreate ,
27
+ GroupChatCreateComponentProps = { } ,
28
+ GroupChatDetailsComponent = DefaultGroupChatDetails ,
29
+ GroupChatDetailsComponentProps = { } ,
30
+ GroupChatEditComponent = DefaultGroupChatEdit ,
31
+ GroupChatEditComponentProps = { } ,
32
+ SingleChatCreateComponent = DefaultSingleChatCreate ,
33
+ SingleChatCreateComponentProps = { } ,
34
34
} ) => {
35
35
const isUpToMd = useResponsive ( 'up' , 'md' )
36
36
const [ leftPanelContent , setLeftPanelContent ] = useState < LeftPanelContentValues > (
@@ -57,46 +57,46 @@ const ChatRoomsComponent: FC<ChatRoomsComponentProps> = ({
57
57
switch ( leftPanelContent ) {
58
58
case LEFT_PANEL_CONTENT . createGroupChat :
59
59
return (
60
- < GroupChatRoomCreateComponent
60
+ < GroupChatCreateComponent
61
61
allProfilesRef = { chatRoomsQueryData }
62
62
onValidSubmission = { ( ) => setLeftPanelContent ( LEFT_PANEL_CONTENT . chatRoomList ) }
63
63
onBackButtonClicked = { ( ) => setLeftPanelContent ( LEFT_PANEL_CONTENT . createChat ) }
64
- { ...GroupChatRoomCreateComponentProps }
64
+ { ...GroupChatCreateComponentProps }
65
65
/>
66
66
)
67
67
case LEFT_PANEL_CONTENT . editGroupChat :
68
68
if ( ! groupDetailsQueryRef ) return null
69
69
return (
70
- < GroupChatRoomEditComponent
70
+ < GroupChatEditComponent
71
71
onCancellation = { ( ) => setLeftPanelContent ( LEFT_PANEL_CONTENT . groupDetails ) }
72
72
onRemovalFromGroup = { ( ) => setLeftPanelContent ( LEFT_PANEL_CONTENT . chatRoomList ) }
73
73
onValidSubmission = { ( ) => setLeftPanelContent ( LEFT_PANEL_CONTENT . groupDetails ) }
74
74
queryRef = { groupDetailsQueryRef }
75
75
roomId = { selectedRoom }
76
76
allProfilesRef = { chatRoomsQueryData }
77
- { ...GroupChatRoomEditComponentProps }
77
+ { ...GroupChatEditComponentProps }
78
78
/>
79
79
)
80
80
case LEFT_PANEL_CONTENT . groupDetails :
81
81
if ( ! groupDetailsQueryRef ) return null
82
82
return (
83
- < GroupChatRoomDetailsComponent
83
+ < GroupChatDetailsComponent
84
84
queryRef = { groupDetailsQueryRef }
85
85
onBackButtonClicked = { ( ) => setLeftPanelContent ( LEFT_PANEL_CONTENT . chatRoomList ) }
86
86
onEditButtonClicked = { ( ) => setLeftPanelContent ( LEFT_PANEL_CONTENT . editGroupChat ) }
87
- { ...GroupChatRoomDetailsComponentProps }
87
+ { ...GroupChatDetailsComponentProps }
88
88
/>
89
89
)
90
90
case LEFT_PANEL_CONTENT . createChat :
91
91
return (
92
- < SingleChatRoomCreateComponent
92
+ < SingleChatCreateComponent
93
93
allProfilesRef = { chatRoomsQueryData }
94
94
onHeaderClick = { ( ) => setLeftPanelContent ( LEFT_PANEL_CONTENT . chatRoomList ) }
95
95
onChatCreation = { ( ) => setLeftPanelContent ( LEFT_PANEL_CONTENT . chatRoomList ) }
96
96
onGroupChatCreationButtonClicked = { ( ) =>
97
97
setLeftPanelContent ( LEFT_PANEL_CONTENT . createGroupChat )
98
98
}
99
- { ...SingleChatRoomCreateComponentProps }
99
+ { ...SingleChatCreateComponentProps }
100
100
/>
101
101
)
102
102
default :
0 commit comments