Skip to content

Commit

Permalink
Merge pull request #112 from ablej-ssafy/feature/70-search
Browse files Browse the repository at this point in the history
[#70]fix: cursor-pointer 수정
  • Loading branch information
rlaehdud1002 authored Nov 17, 2024
2 parents db73c8f + 54e3ff7 commit 334524a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
Binary file added src/assets/images/base-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.button {
cursor: pointer;
}
4 changes: 3 additions & 1 deletion src/components/common/CardScrapButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import {FaBookmark, FaRegBookmark} from 'react-icons/fa6';

import styles from './cardScrapButton.module.scss';

interface CompanyRecruitmentCardProps {
scrap?: () => void;
isScrap: boolean;
}

const CardScrapButton = ({scrap, isScrap}: CompanyRecruitmentCardProps) => {
return (
<button onClick={scrap}>
<button onClick={scrap} className={styles.button}>
{isScrap ? <FaBookmark /> : <FaRegBookmark />}
</button>
);
Expand Down
9 changes: 4 additions & 5 deletions src/components/common/CardScrapServerButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@ const CardScrapButton = ({
name={`isScrap:${recruitmentId}`}
value={String(isScrap)}
/>
<label
htmlFor={`submit-button-${recruitmentId}`}
className={styles.container}
>
<label htmlFor={`submit-button-${recruitmentId}`}>
<input
type="submit"
name="recruitmentId"
value={recruitmentId}
id={`submit-button-${recruitmentId}`}
className={styles['scrap-button']}
/>
{isScrap ? <FaBookmark /> : <FaRegBookmark />}
<div className={styles.container}>
{isScrap ? <FaBookmark /> : <FaRegBookmark />}
</div>
</label>
</div>
);
Expand Down
7 changes: 4 additions & 3 deletions src/components/common/CompanyRecruitmentCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Image from 'next/image';
import Link from 'next/link';

import BaseImage from '@/assets/images/base-image.png';
import CardScrapButton from '@/components/common/CardScrapButton';
import CardScrapServerButton from '@/components/common/CardScrapServerButton';

Expand Down Expand Up @@ -31,14 +32,16 @@ const CompanyRecruitmentCard = ({
prefetch={false}
>
<Image
src={thumbnail}
src={thumbnail ? thumbnail : BaseImage}
alt="sample_img"
width={280}
objectFit="cover"
height={180}
quality={100}
className={styles.img}
/>
<div className={styles['job-title']}>{name}</div>
<span className={styles['company-name']}>{companyName}</span>
</Link>
{scrap ? (
<CardScrapButton scrap={scrap} isScrap={isScrap} />
Expand All @@ -48,8 +51,6 @@ const CompanyRecruitmentCard = ({
isScrap={isScrap}
/>
)}
<div className={styles['job-title']}>{name}</div>
<span className={styles['company-name']}>{companyName}</span>
</div>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/features/recruitment/Detail/RecruitmentTitle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const RecruitmentTitle = ({
<Image
className={styles['margin-right']}
src={thumbnail}
alt="회사 로고"
alt={company.name}
width={45}
height={45}
/>
Expand Down

0 comments on commit 334524a

Please sign in to comment.