This commit is contained in:
2025-10-09 15:41:01 +05:00
11 changed files with 322 additions and 32 deletions
@@ -0,0 +1,43 @@
import PopupWrapper from "../PopupWrapper";
import Button from "../ui/Button";
import ChevronLeftIcon from "../icons/ChevronLeftIcon";
import usePopupStore from "../../store/popupStore";
import SharePopup from "./SharePopup";
import QRCode from "react-qr-code";
interface QRCodePopupProps {
link: string;
}
function QRCodePopup({ link }: QRCodePopupProps) {
const { setPopup } = usePopupStore();
return (
<PopupWrapper
draggable
leftButton={
<Button
variant="secondary"
size="small"
onClick={() => setPopup(<SharePopup link={link} />)}
>
<div className="2xl:size-[1.111vw] size-4">
<ChevronLeftIcon />
</div>
</Button>
}
>
<div className="flex flex-col 2xl:gap-y-[1.667vw] gap-y-6 items-center">
<QRCode value={link} className="2xl:size-[10.556vw] size-[152px]" />
<div className="2xl:space-y-[0.556vw] space-y-2">
<p className="title-m font-medium">Подключайтесь к сеансу</p>
<p className="caption-s font-medium text-center text-[#CCCCCC]">
Можно даже с мобильным интернетом
</p>
</div>
</div>
</PopupWrapper>
);
}
export default QRCodePopup;
+11 -3
View File
@@ -3,14 +3,22 @@ import ShareFilledIcon from "../icons/ShareFilledIcon";
import PopupWrapper from "../PopupWrapper";
import Button from "../ui/Button";
import LinkShare from "../ui/LinkShare";
import usePopupStore from "../../store/popupStore";
import QRCodePopup from "./QRCodePopup";
function SharePopup({ link }: { link: string }) {
const { setPopup } = usePopupStore();
function SharePopup() {
return (
<PopupWrapper
title="Пригласить"
draggable
leftButton={
<Button variant="secondary" size="small">
<Button
variant="secondary"
size="small"
onClick={() => setPopup(<QRCodePopup link={link} />)}
>
<div className="2xl:size-[1.111vw] size-4">
<QRIcon />
</div>
@@ -19,7 +27,7 @@ function SharePopup() {
>
<div className="mb-[1.389vw]">
<p className="title-s mb-[0.833vw] font-medium">Скопировать ссылку</p>
<LinkShare link={"https://estate.stream/ahdy12jdco1"} />
<LinkShare link={link} />
</div>
<Button variant="primary" size="large" className="w-full">
Отправить