Skip to content

Commit

Permalink
✨ Feat - seminar banner 이동 로직 변경 #44
Browse files Browse the repository at this point in the history
  • Loading branch information
bianbbc87 committed May 8, 2024
1 parent a8f19c6 commit c30aa8c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/seminar/header/SeminarHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import BannerImg from '@/svg/seminar/seminar_banner.svg';
import { motion } from 'framer-motion';
import Link from 'next/link';
import { OPEN_SEMINAR_DATA } from '@/constants/seminar/openSeminarData';
import { OpenSeminar } from '@/interfaces/seminar/openSeminar';

/**
* @description
Expand All @@ -16,9 +16,9 @@ import { OPEN_SEMINAR_DATA } from '@/constants/seminar/openSeminarData';
* Renders the header component for the recruitment section.
* @returns The rendered header component.
*/
const SeminarHeader = () => {
const SeminarHeader = ({openSeminars}:{openSeminars:OpenSeminar[]}) => {
// 현재 진행 세미나
const active_seminar_id = OPEN_SEMINAR_DATA.find(seminar => seminar.status)?.id;
const active_seminar_id = openSeminars.find(seminar => seminar.status)?.id;

return (
<>
Expand All @@ -30,9 +30,10 @@ const SeminarHeader = () => {
whileTap={{ scale: 0.8 }}
transition={{ duration: 0.2 }}
>
<Link
href={`seminar/open/${active_seminar_id}`}
>
<Link
key={active_seminar_id}
href={`/seminar/open/${active_seminar_id}`}
>
<BannerImg className='mt-10 scale-100' />
</Link>
</motion.section>
Expand Down

0 comments on commit c30aa8c

Please sign in to comment.