diff --git a/components/Dashboard/ModalQRCode/index.tsx b/components/Dashboard/ModalQRCode/index.tsx index 6114c32..9283d48 100644 --- a/components/Dashboard/ModalQRCode/index.tsx +++ b/components/Dashboard/ModalQRCode/index.tsx @@ -1,17 +1,14 @@ -import Image from 'next/image' -import { useState } from 'react' - import CloseIcon from '@mui/icons-material/Close' import Alert from '@mui/material/Alert' import Box from '@mui/material/Box' -import CircularProgress from '@mui/material/CircularProgress' -import Collapse from '@mui/material/Collapse' import Dialog from '@mui/material/Dialog' import DialogContent from '@mui/material/DialogContent' import DialogTitle from '@mui/material/DialogTitle' import Grow from '@mui/material/Grow' import IconButton from '@mui/material/IconButton' +import { QRCodeSVG } from 'qrcode.react' + type Props = { qrCode: string open: boolean @@ -21,17 +18,10 @@ type Props = { const ModalQRCode = (props: Props) => { const { open, qrCode, setOpen } = props - const [show, setShow] = useState(false) - - const handleClose = () => { - setOpen(false) - setShow(false) - } - return ( setOpen(false)} TransitionComponent={Grow} PaperProps={{ sx: { @@ -46,7 +36,7 @@ const ModalQRCode = (props: Props) => { > My QR Code setOpen(false)} sx={{ position: 'absolute', right: 8, @@ -58,33 +48,9 @@ const ModalQRCode = (props: Props) => { - - Turn up your brightness for sign-ins. - - - User QR Code setShow(true)} - /> - {!show && } + Turn up your brightness for sign-ins. + + diff --git a/components/HomePage/Sponsors/Assets/AWS.tsx b/components/HomePage/Sponsors/Assets/AWS.tsx new file mode 100644 index 0000000..fdca8dc --- /dev/null +++ b/components/HomePage/Sponsors/Assets/AWS.tsx @@ -0,0 +1,24 @@ +const AWS = () => { + return ( + + + + + + ) +} + +export default AWS diff --git a/components/HomePage/Sponsors/Assets/FDM.tsx b/components/HomePage/Sponsors/Assets/FDM.tsx deleted file mode 100644 index 177d5ff..0000000 --- a/components/HomePage/Sponsors/Assets/FDM.tsx +++ /dev/null @@ -1,31 +0,0 @@ -const FDM = () => { - return ( - - - - - - - - - - - - - - ) -} - -export default FDM diff --git a/components/HomePage/Sponsors/index.tsx b/components/HomePage/Sponsors/index.tsx index 9208de9..740afee 100644 --- a/components/HomePage/Sponsors/index.tsx +++ b/components/HomePage/Sponsors/index.tsx @@ -5,9 +5,9 @@ import Grid from '@mui/material/Grid' import Tooltip from '@mui/material/Tooltip' import Typography from '@mui/material/Typography' +import AWS from '@/components/HomePage/Sponsors/Assets/AWS' import BigDataAIHub from '@/components/HomePage/Sponsors/Assets/BigDataAIHub' import Echo3D from '@/components/HomePage/Sponsors/Assets/Echo3D' -import FDM from '@/components/HomePage/Sponsors/Assets/FDM' import ICUBE from '@/components/HomePage/Sponsors/Assets/ICUBE' import MCSS from '@/components/HomePage/Sponsors/Assets/MCSS' import MLH from '@/components/HomePage/Sponsors/Assets/MLH' @@ -103,14 +103,11 @@ const Sponsors = () => { > } link="https://mlh.io" tier="bronze" /> } - link="https://utoronto.ca" + name="Amazon Web Services" + logo={} + link="https://aws.amazon.com" tier="bronze" /> - {false && ( - } link="https://fdmgroup.com" tier="bronze" /> - )} } link="https://echo3d.com" tier="bronze" /> { link="https://standoutstickers.com" tier="bronze" /> + } + link="https://utoronto.ca" + tier="bronze" + /> ...and more to come! diff --git a/hooks/User/useUserGet.ts b/hooks/User/useUserGet.ts index 192699f..3d5b57a 100644 --- a/hooks/User/useUserGet.ts +++ b/hooks/User/useUserGet.ts @@ -17,7 +17,6 @@ export const useUserGet = (props?: Props) => { refetchOnWindowFocus: false, onSuccess: (data) => { data.user.avatar = getAvatar(data.user) - data.user.qr_code = getQRCode(data.user.qr_code) data.user.verified = true props?.onSuccess?.() }, @@ -39,7 +38,3 @@ const getAvatar = (user: User) => { return `https://cdn.discordapp.com/embed/avatars/${index}.png` } } - -const getQRCode = (qrCode: string) => { - return `https://chart.googleapis.com/chart?cht=qr&chl=${qrCode}&chs=500x500` -} diff --git a/next.config.js b/next.config.js index 08bde8a..c69d978 100644 --- a/next.config.js +++ b/next.config.js @@ -22,11 +22,6 @@ const nextConfig = { hostname: 'cdn.discordapp.com', pathname: '/**', }, - { - protocol: 'https', - hostname: 'chart.googleapis.com', - pathname: '/chart/**', - }, ], }, } diff --git a/package.json b/package.json index da68367..2f2ee58 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "mui-tel-input": "^5.0.0", "next": "13.5.4", "next-pwa": "^5.6.0", + "qrcode.react": "^3.1.0", "react": "18.2.0", "react-dom": "18.2.0", "react-hook-form": "^7.48.2", diff --git a/yarn.lock b/yarn.lock index e0eb4d2..f316cc5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4125,6 +4125,11 @@ punycode@^2.1.0: resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== +qrcode.react@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/qrcode.react/-/qrcode.react-3.1.0.tgz#5c91ddc0340f768316fbdb8fff2765134c2aecd8" + integrity sha512-oyF+Urr3oAMUG/OiOuONL3HXM+53wvuH3mtIWQrYmsXoAq0DkvZp2RYUWFSMFtbdOpuS++9v+WAkzNVkMlNW6Q== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz"