All files / src/components/pages/message/message-following-search index.tsx

100% Statements 24/24
100% Branches 2/2
100% Functions 2/2
100% Lines 24/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 7x 7x 7x 7x 7x 1x 1x 7x 7x 7x 7x 7x 7x 7x 7x 7x  
'use client';
 
import { Icon } from '@/components/icon';
import { useModal } from '@/components/ui';
 
import { FollowingModal } from '../message-following-modal';
 
export const FollowingSearch = ({ userId }: { userId: number }) => {
  const { open } = useModal();
  return (
    <div
      className='bg-mono-white mb-2 flex items-center gap-5 px-5 py-4 transition-all hover:cursor-pointer hover:opacity-80'
      onClick={() => {
        open(<FollowingModal userId={userId} />);
      }}
    >
      <div className='rounded-full border-2 border-dashed border-gray-400 bg-gray-100 p-2'>
        <Icon id='plus' className='size-6 text-gray-700' />
      </div>
 
      <span className='text-text-md-bold text-gray-800'>팔로우 추가</span>
    </div>
  );
};