@@ -7,35 +7,45 @@ import UserIcon from '../icons/UserIcon';
77import { SearchBar } from './Styles' ;
88
99// TODO: Once DMs are implemented, this component will need to be updated to handle DMs as well.
10- function WrappedComponent ( { profile, server_user, roles } : { profile : User , server_user : ServerUser , roles : Role [ ] } ) {
10+ function WrappedComponent ( {
11+ profile,
12+ server_user,
13+ roles,
14+ } : {
15+ profile : User ;
16+ server_user : ServerUser ;
17+ roles : Role [ ] ;
18+ } ) {
1119 return (
1220 < div className = "flex flex-col space-y-2 items-center p-3" >
13- < UserIcon user = { profile } className = '!w-9 !h-9' />
14- { server_user . nickname && < h2 className = 'text-lg' >
15- { server_user . nickname }
16- </ h2 > }
17- < h2 className = { server_user . nickname ? 'text-base' : 'text-lg' } > { profile . username } </ h2 >
18- < hr />
19- < h2 className = 'text-sm text-gray-400 text-left w-full' > Roles</ h2 >
20- < div className = 'flex flex-col w-full items-center space-y-1' >
21- { roles . map ( role => (
21+ < UserIcon user = { profile } className = "!w-9 !h-9" />
22+ { server_user . nickname && (
23+ < h2 className = "text-lg" > { server_user . nickname } </ h2 >
24+ ) }
25+ < h2 className = { server_user . nickname ? 'text-base' : 'text-lg' } >
26+ { profile . username }
27+ </ h2 >
28+ < hr />
29+ < h2 className = "text-sm text-gray-400 text-left w-full" > Roles</ h2 >
30+ < div className = "flex flex-col w-full items-center space-y-1" >
31+ { roles . map ( ( role ) => (
2232 < span
2333 key = { role . id }
24- className = ' text-sm text-gray-400 py-1 px-2 border-2 border-solid w-full rounded-sm'
34+ className = " text-sm text-gray-400 py-1 px-2 border-2 border-solid w-full rounded-sm"
2535 style = { {
2636 border : `1px solid #${ ! ! role . color ? role . color : 'cacacacc' } ` ,
2737 color : `#${ ! ! role . color ? role . color : 'cacacacc' } ` ,
2838 } }
2939 >
3040 { role . name }
3141 </ span >
32- ) ) }
42+ ) ) }
3343 </ div >
34- < hr />
44+ < hr />
3545 < form >
3646 < input
3747 type = "text"
38- className = { `${ SearchBar } ` }
48+ className = { `${ SearchBar ( 'bg-grey-900' ) } ` }
3949 placeholder = { `Message @${ profile . username } ` }
4050 />
4151 </ form >
0 commit comments