From 5d981aa2a505f3bb2b76ca2cddde69f88bdeff2a Mon Sep 17 00:00:00 2001 From: jhynsoo Date: Mon, 12 Aug 2024 09:42:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B0=95=EC=82=AC=EA=B0=80=20=EB=9D=BC?= =?UTF-8?q?=EC=9D=B4=EB=B8=8C=20=EB=B0=A9=20=EB=A7=8C=EB=93=A4=20=EC=88=98?= =?UTF-8?q?=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/LectureHeader/LectureHeader.jsx | 5 ++++- frontend/src/store/userTypeSlice.js | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/LectureHeader/LectureHeader.jsx b/frontend/src/components/LectureHeader/LectureHeader.jsx index 6cb8239..2dfa40a 100644 --- a/frontend/src/components/LectureHeader/LectureHeader.jsx +++ b/frontend/src/components/LectureHeader/LectureHeader.jsx @@ -3,9 +3,12 @@ import styles from './LectureHeader.module.css'; import PlayIcon from '/src/assets/icons/play.svg?react'; import CompassIcon from '/src/assets/icons/compass.svg?react'; import UserIcon from '/src/assets/icons/user.svg?react'; +import useBoundStore from '../../store'; export default function LectureHeader({ img, title, tutorImg, tutor, isLive = false }) { const { lectureId } = useParams(); + const userType = useBoundStore((state) => state.userType); + const isTeacher = userType === 'teacher'; return (
@@ -39,7 +42,7 @@ export default function LectureHeader({ img, title, tutorImg, tutor, isLive = fa
{tutor}
- {isLive ? ( + {isLive || isTeacher ? ( ({ userType: null, setUserType: (userType) => set({ userType }), - isTeacher: () => set.userType === 'teacher', - isStudent: () => set.userType === 'student', - isGuest: () => set.userType === null, });