diff --git a/frontend/src/components/StudentProfile.tsx b/frontend/src/components/StudentProfile.tsx index 8c8be01..4e33487 100644 --- a/frontend/src/components/StudentProfile.tsx +++ b/frontend/src/components/StudentProfile.tsx @@ -157,7 +157,7 @@ function ProgramLayout({ enrollmentInfo }: ProgramLayoutProps) { export default function StudentProfile({ id }: StudentProfileProps) { const [currentView, setCurrentView] = useState<"View" | "Edit">("View"); - const { firebaseUser } = useContext(UserContext); + const { firebaseUser, isAdmin } = useContext(UserContext); const [firebaseToken, setFirebaseToken] = useState(); const [notFound, setNotFound] = useState(false); const [studentData, setStudentData] = useState(); @@ -508,43 +508,46 @@ export default function StudentProfile({ id }: StudentProfileProps) { */} +
- -
-
-
  • This cannot be undone!
  • -
  • - This will remove this student from all enrolled programs and delete all - notes and documents. -
  • + {isAdmin && ( + +
    +
    +
  • This cannot be undone!
  • +
  • + This will remove this student from all enrolled programs and delete all + notes and documents. +
  • +
    -
    -
    - Enter the student's last name to proceed - -
    - - } - kind="destructive" - triggerElement={ - - } - confirmText="Delete" - icon={
    } - isParentOpen={deleteDialogOpen} - setIsParentOpen={setDeleteDialogOpen} - onConfirmClick={deleteStudentHandler} - /> +
    + Enter the student's last name to proceed + +
    + + } + kind="destructive" + triggerElement={ + + } + confirmText="Delete" + icon={
    } + isParentOpen={deleteDialogOpen} + setIsParentOpen={setDeleteDialogOpen} + onConfirmClick={deleteStudentHandler} + /> + )}