Skip to content

Commit d27ee8a

Browse files
authored
added in QR code image (#6)
1 parent 61813cc commit d27ee8a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

{{cookiecutter.project_slug}}/frontend/app/components/settings/Security.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
updateUserProfile,
1616
} from "../../lib/slices/authSlice"
1717
import { refreshTokens, token } from "../../lib/slices/tokensSlice"
18+
import { QRCodeSVG } from 'qrcode.react'
1819

1920
const title = "Security"
2021
const redirectTOTP = "/settings"
@@ -313,7 +314,7 @@ export default function Security() {
313314
Open the app and scan the QR code below to pair
314315
your mobile with your account.
315316
</p>
316-
{/* <QrcodeVue :value="totpNew.uri" :size="qrSize" level="M" render-as="svg" className="my-2 mx-auto"/> */}
317+
<QRCodeSVG value={totpNew.uri} size={qrSize} level="M" className="my-2 mx-auto"/>
317318
<p>
318319
If you can&apos;t scan, you can type in the
319320
following key:

{{cookiecutter.project_slug}}/frontend/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"remark-gfm": "^4.0.0",
3232
"remark-html": "^16.0.1",
3333
"remark-toc": "^9.0.0",
34-
"tailwind": "^4.0.0"
34+
"tailwind": "^4.0.0",
35+
"qrcode.react": "^3.1.0"
3536
},
3637
"devDependencies": {
3738
"@types/mdx": "^2.0.8",

0 commit comments

Comments
 (0)