Spaces:
Sleeping
Sleeping
| import React from 'react'; | |
| import { api } from '../services/api'; | |
| import { TeacherReports } from './TeacherReports'; | |
| import { StudentReports } from './StudentReports'; | |
| import { SensitiveContentProtection } from '../components/SensitiveContentProtection'; | |
| export const Reports: React.FC = () => { | |
| const currentUser = api.auth.getCurrentUser(); | |
| const isStudent = currentUser?.role === 'STUDENT'; | |
| if (isStudent) { | |
| return <StudentReports />; | |
| } | |
| return ( | |
| <SensitiveContentProtection> | |
| <TeacherReports /> | |
| </SensitiveContentProtection> | |
| ); | |
| }; | |