2024-12-18 12:35:17 +03:00
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
import { QRCodeSVG } from 'qrcode.react';
|
|
|
|
|
|
2025-02-10 01:32:16 +03:00
|
|
|
import { ModalView } from '@/components/Modal';
|
2025-01-16 16:31:03 +03:00
|
|
|
import { useDialogsStore } from '@/stores/dialogs';
|
2024-12-18 12:35:17 +03:00
|
|
|
|
2025-01-16 16:31:03 +03:00
|
|
|
export interface DlgShowQRProps {
|
2024-12-18 12:35:17 +03:00
|
|
|
target: string;
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-19 23:29:45 +03:00
|
|
|
export function DlgShowQR() {
|
2025-01-16 16:31:03 +03:00
|
|
|
const { target } = useDialogsStore(state => state.props as DlgShowQRProps);
|
2024-12-18 12:35:17 +03:00
|
|
|
return (
|
2025-03-10 16:01:40 +03:00
|
|
|
<ModalView className='w-100 pb-6 pt-12 flex justify-center items-center'>
|
2024-12-18 12:35:17 +03:00
|
|
|
<div className='bg-[#ffffff] p-4 border'>
|
|
|
|
|
<QRCodeSVG value={target} size={256} />
|
|
|
|
|
</div>
|
2025-02-06 20:27:56 +03:00
|
|
|
</ModalView>
|
2024-12-18 12:35:17 +03:00
|
|
|
);
|
|
|
|
|
}
|