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, });