File tree 5 files changed +15
-14
lines changed
5 files changed +15
-14
lines changed Original file line number Diff line number Diff line change 1
- import { twMerge } from 'tailwind-merge' ;
2
1
import ChatBox from '../single/chatbox' ;
3
2
import UserList from '../single/UserList' ;
4
3
import Chat from '../single/chat' ;
4
+ import { cn } from '@/lib/utils' ;
5
5
6
6
export default function ChatRoom ( props : any ) {
7
7
return (
8
8
< div
9
9
id = "big-panel"
10
- className = { twMerge (
10
+ className = { cn (
11
11
props . className ,
12
12
'flex break-normal h-screen' ,
13
13
) }
@@ -17,9 +17,7 @@ export default function ChatRoom(props: any) {
17
17
< Chat
18
18
/>
19
19
</ div >
20
- < div className = "flex-grow" >
21
- < ChatBox />
22
- </ div >
20
+ < ChatBox />
23
21
</ div >
24
22
< div className = "w-64" >
25
23
< UserList
Original file line number Diff line number Diff line change 1
1
import {
2
2
HTMLAttributes ,
3
3
useContext ,
4
- useRef ,
5
- useState ,
6
4
} from 'react' ;
7
- import { twMerge } from 'tailwind-merge' ;
8
5
9
6
import { PS_context } from './PS_context' ;
10
7
import UserList from './UserList' ;
@@ -13,6 +10,7 @@ import ChatBox from './chatbox';
13
10
import Chat from './chat' ;
14
11
import Home from '../../Home' ;
15
12
import SettingsPage from '../../SettingsPage' ;
13
+ import { cn } from '@/lib/utils' ;
16
14
17
15
export default function BigPanel ( props : Readonly < HTMLAttributes < 'div' > > ) {
18
16
const { selectedPage : room , rooms } = useContext ( PS_context ) ;
@@ -27,7 +25,7 @@ export default function BigPanel(props: Readonly<HTMLAttributes<'div'>>) {
27
25
return < SettingsPage className = { props . className } /> ;
28
26
} else {
29
27
return (
30
- < div className = { twMerge ( props . className , 'flex flex-col text-red-400' ) } >
28
+ < div className = { cn ( props . className , 'flex flex-col text-red-400' ) } >
31
29
Unknown room type: "{ roomType } "
32
30
</ div >
33
31
) ;
@@ -37,7 +35,7 @@ export default function BigPanel(props: Readonly<HTMLAttributes<'div'>>) {
37
35
return (
38
36
< div
39
37
id = "big-panel"
40
- className = { twMerge (
38
+ className = { cn (
41
39
props . className ,
42
40
'flex break-normal h-screen' ,
43
41
) }
Original file line number Diff line number Diff line change @@ -35,7 +35,13 @@ export default function UserList() {
35
35
36
36
return (
37
37
< div className = "bg-gray-sidebar-light dark:bg-gray-600 w-full h-full p-2 overflow-y-auto whitespace-nowrap" >
38
- < input className = "w-full text-sm h-10 py-1 mb-2 px-2 bg-gray-251 placeholder:text-gray-150 dark:bg-gray-700 rounded-md" type = "text" placeholder = "Search users" value = { search } onChange = { ( e ) => setSearch ( e . target . value ) } />
38
+ < input
39
+ className = "w-full text-sm h-10 py-1 mb-2 px-2 bg-gray-251 placeholder:text-gray-150 dark:bg-gray-700 rounded-md"
40
+ type = "text"
41
+ placeholder = "Search users"
42
+ value = { search }
43
+ onChange = { ( e ) => setSearch ( e . target . value ) }
44
+ />
39
45
{ staff . length > 0 && < h2 className = "text-sm font-bold text-gray-500 dark:text-gray-175 mb-2" > Staff</ h2 > }
40
46
{ staff . map ( ( user , index ) => (
41
47
< div key = { index } >
Original file line number Diff line number Diff line change 1
1
import {
2
2
createRef ,
3
3
Fragment ,
4
- MouseEvent ,
5
4
useCallback ,
6
5
useContext ,
7
6
useLayoutEffect ,
Original file line number Diff line number Diff line change 1
1
import { HTMLAttributes , useContext } from 'react' ;
2
2
import { PS_context } from './PS_context' ;
3
3
import { RoomListComponent } from '../RoomListComponent' ;
4
- import { twMerge } from 'tailwind-merge' ;
5
4
import {
6
5
restrictToParentElement ,
7
6
restrictToVerticalAxis ,
@@ -23,6 +22,7 @@ import {
23
22
verticalListSortingStrategy ,
24
23
} from '@dnd-kit/sortable' ;
25
24
import SortableItem from '../../../utils/Sortable' ;
25
+ import { cn } from '@/lib/utils' ;
26
26
27
27
export default function Sidebar ( props : Readonly < HTMLAttributes < 'div' > > ) {
28
28
const { rooms, setRooms } = useContext ( PS_context ) ;
@@ -63,7 +63,7 @@ export default function Sidebar(props: Readonly<HTMLAttributes<'div'>>) {
63
63
>
64
64
< div
65
65
id = 'sidebar'
66
- className = { twMerge (
66
+ className = { cn (
67
67
'bg-gray-sidebar-light dark:bg-gray-600 h-screen flex flex-col justify-between' ,
68
68
props . className ,
69
69
) }
You can’t perform that action at this time.
0 commit comments