diff --git a/src/pages/dashboard/manage.tsx b/src/pages/dashboard/manage.tsx
index 531f646..eba4436 100644
--- a/src/pages/dashboard/manage.tsx
+++ b/src/pages/dashboard/manage.tsx
@@ -2,10 +2,11 @@ import { LoadingOverlay } from '@mantine/core';
import Layout from 'components/Layout';
import Manage from 'components/pages/Manage';
import useLogin from 'hooks/useLogin';
+import type { ServerSideProps } from 'middleware/getServerSideProps';
import Head from 'next/head';
export { getServerSideProps } from 'middleware/getServerSideProps';
-export default function ManagePage(props) {
+export default function ManagePage(props: ServerSideProps) {
const { loading } = useLogin();
if (loading) return ;
@@ -17,7 +18,11 @@ export default function ManagePage(props) {
{title}
-
+
>
);
diff --git a/yarn.lock b/yarn.lock
index 05ea71d..e8a6159 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1090,6 +1090,54 @@ __metadata:
languageName: node
linkType: hard
+"@otplib/core@npm:^12.0.1":
+ version: 12.0.1
+ resolution: "@otplib/core@npm:12.0.1"
+ checksum: b3c34bc20b31bc3f49cc0dc3c0eb070491c0101e8c1efa83cec48ca94158bd736aaca8187df667fc0c4a239d4ac52076bc44084bee04a50c80c3630caf77affa
+ languageName: node
+ linkType: hard
+
+"@otplib/plugin-crypto@npm:^12.0.1":
+ version: 12.0.1
+ resolution: "@otplib/plugin-crypto@npm:12.0.1"
+ dependencies:
+ "@otplib/core": ^12.0.1
+ checksum: 6867c74ee8aca6c2db9670362cf51e44f3648602c39318bf537421242e33f0012a172acd43bbed9a21d706e535dc4c66aff965380673391e9fd74cf685b5b13a
+ languageName: node
+ linkType: hard
+
+"@otplib/plugin-thirty-two@npm:^12.0.1":
+ version: 12.0.1
+ resolution: "@otplib/plugin-thirty-two@npm:12.0.1"
+ dependencies:
+ "@otplib/core": ^12.0.1
+ thirty-two: ^1.0.2
+ checksum: 920099e40d3e8c2941291c84c70064c2d86d0d1ed17230d650445d5463340e406bc413ddf2e40c374ddc4ee988ef1e3facacab9b5248b1ff361fd13df52bf88f
+ languageName: node
+ linkType: hard
+
+"@otplib/preset-default@npm:^12.0.1":
+ version: 12.0.1
+ resolution: "@otplib/preset-default@npm:12.0.1"
+ dependencies:
+ "@otplib/core": ^12.0.1
+ "@otplib/plugin-crypto": ^12.0.1
+ "@otplib/plugin-thirty-two": ^12.0.1
+ checksum: 8133231384f6277f77eb8e42ef83bc32a8b01059bef147d1c358d9e9bfd292e1c239f581fe008367a48489dd68952b7ac0948e6c41412fc06079da2c91b71d16
+ languageName: node
+ linkType: hard
+
+"@otplib/preset-v11@npm:^12.0.1":
+ version: 12.0.1
+ resolution: "@otplib/preset-v11@npm:12.0.1"
+ dependencies:
+ "@otplib/core": ^12.0.1
+ "@otplib/plugin-crypto": ^12.0.1
+ "@otplib/plugin-thirty-two": ^12.0.1
+ checksum: 367cb09397e617c21ec748d54e920ab43f1c5dfba70cbfd88edf73aecca399cf0c09fefe32518f79c7ee8a06e7058d14b200da378cc7d46af3cac4e22a153e2f
+ languageName: node
+ linkType: hard
+
"@phc/format@npm:^1.0.0":
version: 1.0.0
resolution: "@phc/format@npm:1.0.0"
@@ -1694,6 +1742,15 @@ __metadata:
languageName: node
linkType: hard
+"@types/qrcode@npm:^1.5.0":
+ version: 1.5.0
+ resolution: "@types/qrcode@npm:1.5.0"
+ dependencies:
+ "@types/node": "*"
+ checksum: b0ece3834ca5ba6171132928fd1ef764772dc619b45cb4123461ee05e377ad15553a330d234c69db0d0028c6639a99429e88d99192fbba9c5ee97c23f278c48b
+ languageName: node
+ linkType: hard
+
"@types/qs@npm:*":
version: 6.9.7
resolution: "@types/qs@npm:6.9.7"
@@ -2467,6 +2524,13 @@ __metadata:
languageName: node
linkType: hard
+"camelcase@npm:^5.0.0":
+ version: 5.3.1
+ resolution: "camelcase@npm:5.3.1"
+ checksum: e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b
+ languageName: node
+ linkType: hard
+
"caniuse-lite@npm:^1.0.30001406":
version: 1.0.30001423
resolution: "caniuse-lite@npm:1.0.30001423"
@@ -2597,6 +2661,17 @@ __metadata:
languageName: node
linkType: hard
+"cliui@npm:^6.0.0":
+ version: 6.0.0
+ resolution: "cliui@npm:6.0.0"
+ dependencies:
+ string-width: ^4.2.0
+ strip-ansi: ^6.0.0
+ wrap-ansi: ^6.2.0
+ checksum: 4fcfd26d292c9f00238117f39fc797608292ae36bac2168cfee4c85923817d0607fe21b3329a8621e01aedf512c99b7eaa60e363a671ffd378df6649fb48ae42
+ languageName: node
+ linkType: hard
+
"clone@npm:^1.0.2":
version: 1.0.4
resolution: "clone@npm:1.0.4"
@@ -2964,6 +3039,13 @@ __metadata:
languageName: node
linkType: hard
+"decamelize@npm:^1.2.0":
+ version: 1.2.0
+ resolution: "decamelize@npm:1.2.0"
+ checksum: ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa
+ languageName: node
+ linkType: hard
+
"decode-uri-component@npm:^0.2.0":
version: 0.2.0
resolution: "decode-uri-component@npm:0.2.0"
@@ -3092,6 +3174,13 @@ __metadata:
languageName: node
linkType: hard
+"dijkstrajs@npm:^1.0.1":
+ version: 1.0.2
+ resolution: "dijkstrajs@npm:1.0.2"
+ checksum: 8cd822441a26f190da24d69bfab7b433d080b09e069e41e046ac84e152f182a1ed9478d531b34126e000adaa7b73114a0f85fcac117a7d25b3edf302d57c0d09
+ languageName: node
+ linkType: hard
+
"dir-glob@npm:^3.0.1":
version: 3.0.1
resolution: "dir-glob@npm:3.0.1"
@@ -3235,6 +3324,13 @@ __metadata:
languageName: node
linkType: hard
+"encode-utf8@npm:^1.0.3":
+ version: 1.0.3
+ resolution: "encode-utf8@npm:1.0.3"
+ checksum: 550224bf2a104b1d355458c8a82e9b4ea07f9fc78387bc3a49c151b940ad26473de8dc9e121eefc4e84561cb0b46de1e4cd2bc766f72ee145e9ea9541482817f
+ languageName: node
+ linkType: hard
+
"encoding@npm:^0.1.13":
version: 0.1.13
resolution: "encoding@npm:0.1.13"
@@ -4266,6 +4362,13 @@ __metadata:
languageName: node
linkType: hard
+"get-caller-file@npm:^2.0.1":
+ version: 2.0.5
+ resolution: "get-caller-file@npm:2.0.5"
+ checksum: b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9
+ languageName: node
+ linkType: hard
+
"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.0, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3":
version: 1.1.3
resolution: "get-intrinsic@npm:1.1.3"
@@ -6346,6 +6449,17 @@ __metadata:
languageName: node
linkType: hard
+"otplib@npm:^12.0.1":
+ version: 12.0.1
+ resolution: "otplib@npm:12.0.1"
+ dependencies:
+ "@otplib/core": ^12.0.1
+ "@otplib/preset-default": ^12.0.1
+ "@otplib/preset-v11": ^12.0.1
+ checksum: 4a1b91cf1b8e920b50ad4bac2ef2a89126630c62daf68e9b32ff15106b2551db905d3b979955cf5f8f114da0a8883cec3d636901d65e793c1745bb4174e2a572
+ languageName: node
+ linkType: hard
+
"p-filter@npm:2.1.0":
version: 2.1.0
resolution: "p-filter@npm:2.1.0"
@@ -6684,6 +6798,13 @@ __metadata:
languageName: node
linkType: hard
+"pngjs@npm:^5.0.0":
+ version: 5.0.0
+ resolution: "pngjs@npm:5.0.0"
+ checksum: 04e912cc45fb9601564e2284efaf0c5d20d131d9b596244f8a6789fc6cdb6b18d2975a6bbf7a001858d7e159d5c5c5dd7b11592e97629b7137f7f5cef05904c8
+ languageName: node
+ linkType: hard
+
"postcss@npm:8.4.14":
version: 8.4.14
resolution: "postcss@npm:8.4.14"
@@ -6876,6 +6997,20 @@ __metadata:
languageName: node
linkType: hard
+"qrcode@npm:^1.5.1":
+ version: 1.5.1
+ resolution: "qrcode@npm:1.5.1"
+ dependencies:
+ dijkstrajs: ^1.0.1
+ encode-utf8: ^1.0.3
+ pngjs: ^5.0.0
+ yargs: ^15.3.1
+ bin:
+ qrcode: bin/qrcode
+ checksum: 842f899d95caaad2ac507408b5498be3197e1df16bc6b537b20069d2cb1330e4588b50f672ce4a9ccf01338f7c97b5732ff9b5caaa6eb2338187d3c25a973e79
+ languageName: node
+ linkType: hard
+
"query-string@npm:^7.1.1":
version: 7.1.1
resolution: "query-string@npm:7.1.1"
@@ -7154,6 +7289,20 @@ __metadata:
languageName: node
linkType: hard
+"require-directory@npm:^2.1.1":
+ version: 2.1.1
+ resolution: "require-directory@npm:2.1.1"
+ checksum: fb47e70bf0001fdeabdc0429d431863e9475e7e43ea5f94ad86503d918423c1543361cc5166d713eaa7029dd7a3d34775af04764bebff99ef413111a5af18c80
+ languageName: node
+ linkType: hard
+
+"require-main-filename@npm:^2.0.0":
+ version: 2.0.0
+ resolution: "require-main-filename@npm:2.0.0"
+ checksum: e9e294695fea08b076457e9ddff854e81bffbe248ed34c1eec348b7abbd22a0d02e8d75506559e2265e96978f3c4720bd77a6dad84755de8162b357eb6c778c7
+ languageName: node
+ linkType: hard
+
"resolve-from@npm:^4.0.0":
version: 4.0.0
resolution: "resolve-from@npm:4.0.0"
@@ -8043,6 +8192,13 @@ __metadata:
languageName: node
linkType: hard
+"thirty-two@npm:^1.0.2":
+ version: 1.0.2
+ resolution: "thirty-two@npm:1.0.2"
+ checksum: f6700b31d16ef942fdc0d14daed8a2f69ea8b60b0e85db8b83adf58d84bbeafe95a17d343ab55efaae571bb5148b62fc0ee12b04781323bf7af7d7e9693eec76
+ languageName: node
+ linkType: hard
+
"through2@npm:^3.0.1":
version: 3.0.2
resolution: "through2@npm:3.0.2"
@@ -8468,6 +8624,13 @@ __metadata:
languageName: node
linkType: hard
+"which-module@npm:^2.0.0":
+ version: 2.0.0
+ resolution: "which-module@npm:2.0.0"
+ checksum: 809f7fd3dfcb2cdbe0180b60d68100c88785084f8f9492b0998c051d7a8efe56784492609d3f09ac161635b78ea29219eb1418a98c15ce87d085bce905705c9c
+ languageName: node
+ linkType: hard
+
"which-typed-array@npm:^1.1.2":
version: 1.1.8
resolution: "which-typed-array@npm:1.1.8"
@@ -8578,6 +8741,13 @@ __metadata:
languageName: node
linkType: hard
+"y18n@npm:^4.0.0":
+ version: 4.0.3
+ resolution: "y18n@npm:4.0.3"
+ checksum: 014dfcd9b5f4105c3bb397c1c8c6429a9df004aa560964fb36732bfb999bfe83d45ae40aeda5b55d21b1ee53d8291580a32a756a443e064317953f08025b1aa4
+ languageName: node
+ linkType: hard
+
"yallist@npm:^4.0.0":
version: 4.0.0
resolution: "yallist@npm:4.0.0"
@@ -8592,6 +8762,35 @@ __metadata:
languageName: node
linkType: hard
+"yargs-parser@npm:^18.1.2":
+ version: 18.1.3
+ resolution: "yargs-parser@npm:18.1.3"
+ dependencies:
+ camelcase: ^5.0.0
+ decamelize: ^1.2.0
+ checksum: 60e8c7d1b85814594d3719300ecad4e6ae3796748b0926137bfec1f3042581b8646d67e83c6fc80a692ef08b8390f21ddcacb9464476c39bbdf52e34961dd4d9
+ languageName: node
+ linkType: hard
+
+"yargs@npm:^15.3.1":
+ version: 15.4.1
+ resolution: "yargs@npm:15.4.1"
+ dependencies:
+ cliui: ^6.0.0
+ decamelize: ^1.2.0
+ find-up: ^4.1.0
+ get-caller-file: ^2.0.1
+ require-directory: ^2.1.1
+ require-main-filename: ^2.0.0
+ set-blocking: ^2.0.0
+ string-width: ^4.2.0
+ which-module: ^2.0.0
+ y18n: ^4.0.0
+ yargs-parser: ^18.1.2
+ checksum: 40b974f508d8aed28598087720e086ecd32a5fd3e945e95ea4457da04ee9bdb8bdd17fd91acff36dc5b7f0595a735929c514c40c402416bbb87c03f6fb782373
+ languageName: node
+ linkType: hard
+
"yocto-queue@npm:^0.1.0":
version: 0.1.0
resolution: "yocto-queue@npm:0.1.0"
@@ -8635,6 +8834,7 @@ __metadata:
"@types/minio": ^7.0.14
"@types/multer": ^1.4.7
"@types/node": ^18.11.7
+ "@types/qrcode": ^1.5.0
"@types/react": ^18.0.24
"@types/sharp": ^0.31.0
argon2: ^0.30.1
@@ -8659,8 +8859,10 @@ __metadata:
multer: ^1.4.5-lts.1
next: ^13.0.0
npm-run-all: ^4.1.5
+ otplib: ^12.0.1
prettier: ^2.7.1
prisma: ^4.5.0
+ qrcode: ^1.5.1
react: ^18.2.0
react-chartjs-2: ^4.3.1
react-dom: ^18.2.0