Skip to content

Commit

Permalink
πŸ› fix: 진행 쀑인 μ„œλ₯˜ μƒνƒœλ‘œ λ„˜μ–΄κ°ˆ λ•Œ μ—λŸ¬ μˆ˜μ •ν•˜κΈ° #103
Browse files Browse the repository at this point in the history
  • Loading branch information
naarang committed Nov 5, 2024
1 parent 6a3dc83 commit 4afecf7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/Home/HomeApplicationCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import TopRightArrowIcons from '@/assets/icons/Home/TopRightArrowIcon.svg?react';
import { useCurrentPostIdEmployeeStore } from '@/store/url';
import { OngoingInterviewItemType } from '@/types/home/ongoingInterviewItem';
import { useNavigate } from 'react-router-dom';

Expand All @@ -8,6 +9,12 @@ type HomeApplicationCardProps = {

const HomeApplicationCard = ({ applicationData }: HomeApplicationCardProps) => {
const navigate = useNavigate();
const { updateCurrentPostId } = useCurrentPostIdEmployeeStore();

const goToApplicationDetailPage = () => {
updateCurrentPostId(applicationData.id);
navigate(`/application/${applicationData.id}`);
};

return (
<article className="flex flex-col gap-[0.5rem] px-[1.25rem] pt-[0.75rem] pb-[1.25rem] min-w-[17.5rem] bg-white rounded-[1rem] shadow-cardShadow">
Expand All @@ -26,7 +33,7 @@ const HomeApplicationCard = ({ applicationData }: HomeApplicationCardProps) => {
</div>
<button
className="px-[0.75rem] py-[0.25rem] bg-[#1B1B1B] rounded-[1.313rem]"
onClick={() => navigate(`/application/${applicationData.id}`)}
onClick={goToApplicationDetailPage}
>
<TopRightArrowIcons />
</button>
Expand Down

0 comments on commit 4afecf7

Please sign in to comment.