1
|
import 'antd/dist/antd.css';
|
2
|
import React, { useContext, useEffect } from 'react';
|
3
|
|
4
|
import { useRouter } from 'next/router';
|
5
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
6
|
import { faFileExport } from '@fortawesome/free-solid-svg-icons';
|
7
|
import { Button, Typography } from 'antd';
|
8
|
import styles from '../styles/Link.module.scss';
|
9
|
|
10
|
function LinkPage() {
|
11
|
const router = useRouter();
|
12
|
let url = router.query.url;
|
13
|
|
14
|
if (Array.isArray(url)) {
|
15
|
url = url[0];
|
16
|
}
|
17
|
if (!url) {
|
18
|
return <div>Invalid request</div>;
|
19
|
}
|
20
|
|
21
|
return (
|
22
|
<div className={styles.page}>
|
23
|
<div className={styles.container}>
|
24
|
<div className={styles.header}>Tento odkaz vede mimo anotační službu</div>
|
25
|
<p>
|
26
|
Chystáte se odejít do neznámého a potenciálně nebezpečného prostředí:
|
27
|
</p>
|
28
|
<a href={url}>{url}</a>
|
29
|
|
30
|
<Button onClick={router.back} className={styles.button}>
|
31
|
Zpět
|
32
|
</Button>
|
33
|
</div>
|
34
|
</div>
|
35
|
);
|
36
|
}
|
37
|
|
38
|
export default LinkPage;
|