Enhance modal functionality with ModalContainer component; update ShareModal to use ModalWrapper; improve responsive text sizes in index.css; integrate FloatingActionButton in HomePage for popup sharing.
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import ShareModal from "../components/modals/ShareModal";
|
||||
import Button from "../components/ui/Button";
|
||||
import FloatingActionButton from "../components/ui/FloatingActionButton";
|
||||
import { useMe, useLogout } from "../hooks/useAuth";
|
||||
import { useNavigate } from "react-router";
|
||||
import ShareFilledIcon from "../components/icons/ShareFilledIcon";
|
||||
import SharePopup from "../components/popups/SharePopup";
|
||||
import usePopupStore from "../store/popupStore";
|
||||
|
||||
function HomePage() {
|
||||
const { data: user } = useMe();
|
||||
@@ -13,6 +16,8 @@ function HomePage() {
|
||||
navigate("/login");
|
||||
};
|
||||
|
||||
const { setPopup } = usePopupStore();
|
||||
|
||||
return (
|
||||
<div className="py-8 min-h-screen bg-gray-50">
|
||||
<div className="px-4 mx-auto max-w-4xl">
|
||||
@@ -21,9 +26,15 @@ function HomePage() {
|
||||
|
||||
{/* Потестить модалки */}
|
||||
|
||||
{/* <div className="w-[21.667vw] outline-1 outline">
|
||||
<ShareModal />
|
||||
</div> */}
|
||||
<FloatingActionButton
|
||||
variant="default"
|
||||
// onClick={() => setModal(<ShareModal />)}
|
||||
onClick={() => setPopup(<SharePopup />)}
|
||||
>
|
||||
<div className="2xl:size-[1.111vw] size-4 text-white">
|
||||
<ShareFilledIcon />
|
||||
</div>
|
||||
</FloatingActionButton>
|
||||
|
||||
<div className="space-y-4">
|
||||
<div className="p-4 bg-blue-50 rounded-lg border border-blue-200">
|
||||
|
||||
Reference in New Issue
Block a user