FUJI/src/pages/freshman/react/qrcode.tsx
2025-01-29 11:00:39 +08:00

56 lines
2.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Button, Link, Code } from "@heroui/react"
function QrCodeContent({ qrcode }: { qrcode: string }) {
return (
<div className="box-border flex flex-col items-center gap-4 pb-20 mt-6">
<div
className="my-4 text-center"
>
<div className="text-2xl lg:text-3xl leading-[1.125] font-bold ">
</div>
<div className="mt-2 text-sm text-gray-500">
QQ
</div>
<div className="mt-2 text-sm text-gray-500 flex items-center justify-center gap-1">
<Code
className="flex items-center gap-2 cursor-pointer p-2 sm:p-1 "
onClick={() => {
const inputElement = document.querySelector(
"input[value=\"906370401\"]",
) as HTMLInputElement
if (inputElement) {
inputElement.select()
navigator.clipboard.writeText(inputElement.value)
}
}}
>
<span>
906370401
</span>
<svg aria-hidden="true" fill="none" focusable="false" height="1em" role="presentation" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24" width="1em" class="">
<path d="M16 17.1c0 3.5-1.4 4.9-4.9 4.9H6.9C3.4 22 2 20.6 2 17.1v-4.2C2 9.4 3.4 8 6.9 8h4.2c3.5 0 4.9 1.4 4.9 4.9Z"></path><path d="M8 8V6.9C8 3.4 9.4 2 12.9 2h4.2C20.6 2 22 3.4 22 6.9v4.2c0 3.5-1.4 4.9-4.9 4.9H16"></path><path d="M16 12.9C16 9.4 14.6 8 11.1 8"></path>
</svg>
</Code>
</div>
</div>
<img
src={qrcode}
className="w-64 aspect-square"
/>
<Link
href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=paWMZsf3D_x1ToAjFArynzSEXcRXej8h&authKey=BwD40LqNZNYLGgsI%2B1zIo0AyAh0vVRdhCUDzazeZr2RMWDPKHOMQtiHEKLzOw5Nz&noverify=0&group_code=906370401"
showAnchorIcon={false}
>
<Button
className="w-64"
>
</Button>
</Link>
</div>
)
}
export default QrCodeContent