All files / src/components/pages/chat/chat-header index.tsx

45.83% Statements 11/24
100% Branches 0/0
0% Functions 0/1
45.83% Lines 11/24

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 251x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                            
'use client';
 
import { useRouter } from 'next/navigation';
 
import { Icon } from '@/components/icon';
 
interface ChatHeaderProps {
  onUserListClick: () => void;
}
 
export const ChatHeader = ({ onUserListClick }: ChatHeaderProps) => {
  const router = useRouter();
  return (
    <div className='bg-mono-white flex w-full items-center justify-between border-b border-gray-200 px-5 py-3'>
      <Icon
        id='chevron-left-2'
        className='w-6 cursor-pointer text-gray-500'
        onClick={() => router.back()}
      />
      <span className='text-text-md-bold text-gray-800'>분당 보드게임 동아리</span>
      <Icon id='users-1' className='w-6 cursor-pointer text-gray-500' onClick={onUserListClick} />
    </div>
  );
};