Revize bae9fbba
Přidáno uživatelem Jaroslav Hrubý před asi 2 roky(ů)
webapp/pages/documents/admin/index.tsx | ||
---|---|---|
7 | 7 |
import { faFileLines } from '@fortawesome/free-solid-svg-icons'; |
8 | 8 |
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; |
9 | 9 |
import { LoggedUserContext } from '../../../contexts/LoggedUserContext'; |
10 |
import { MainLayout } from '../../../layouts/mainLayout'; |
|
11 |
import { documentController } from '../../../controllers'; |
|
10 |
import { MainLayout } from '../../../layouts/MainLayout'; |
|
12 | 11 |
|
13 | 12 |
function AdminDocumentPage() { |
14 | 13 |
const redirecting = useUnauthRedirect('/login'); |
15 | 14 |
const { logout, role } = useContext(LoggedUserContext); |
16 | 15 |
const router = useRouter(); |
17 | 16 |
useEffect(() => { |
17 |
console.log(role); |
|
18 | 18 |
if (role !== 'ADMINISTRATOR') { |
19 | 19 |
logout(); |
20 | 20 |
router.push('/login'); |
Také k dispozici: Unified diff
Table of annotator's documents implemented