Skip to content

Commit

Permalink
fix: docs showing test types
Browse files Browse the repository at this point in the history
  • Loading branch information
yeojz committed Dec 30, 2019
1 parent 119760e commit 3f11c3f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions configs/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"exclude": [
"builds",
"configs",
"builds/**/*",
"configs/**/*",
"packages/**/*.js",
"packages/**/*.test.js",
"packages/**/*.test.ts",
"scripts",
"tests",
"website"
"scripts/**/*",
"tests/**/*",
"website/**/*"
],
"excludeExternals": true,
"excludeNotExported": true,
Expand Down
6 changes: 5 additions & 1 deletion website/src/components/QRScan.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { RowLabel, RowContent, RowAction } from './Row';

const QRScan = () => {
const [image, setImage] = useState();
const [link, setLink] = useState();
const { secret } = useContext(SecretContext);

useEffect(() => {
Expand All @@ -18,6 +19,7 @@ const QRScan = () => {
'otplib-website',
secret
);
setLink(otpauth);

qrcode.toDataURL(otpauth, (err, imageUrl) => {
if (err) {
Expand All @@ -33,7 +35,9 @@ const QRScan = () => {
<Fragment>
<RowLabel />
<RowContent>
{image && <img src={image} alt="" />}
{image && link && (
<img src={image} alt="" onClick={() => window.open(link)} />
)}
<p>
Scan this QR Code image with Google Authenticator, Authy or any other
compatible 2FA app.
Expand Down

0 comments on commit 3f11c3f

Please sign in to comment.