diff --git a/workspaces/website/src/components/ProvisionsPopup/ProvisionsPopup.tsx b/workspaces/website/src/components/ProvisionsPopup/ProvisionsPopup.tsx index 9dc78f0970..87c9fe6bae 100644 --- a/workspaces/website/src/components/ProvisionsPopup/ProvisionsPopup.tsx +++ b/workspaces/website/src/components/ProvisionsPopup/ProvisionsPopup.tsx @@ -7,15 +7,13 @@ import { Button } from "@ui/Button"; import { useLocalStorage } from "usehooks-ts"; const ProvisionsPopup = () => { - return null; + const isSsr = typeof window === "undefined"; - const [isProvisionsPopupOpen, setIsProvisionsPopupOpen] = useLocalStorage( + const [isOpenStorage, setIsOpenStorage] = useLocalStorage( "isProvisionsPopupOpen", - true + !isSsr ); - const toggleModal = () => setIsProvisionsPopupOpen((prevState) => !prevState); - const gtmEvent = (event: string) => window?.dataLayer.push({ event }); const gtmEventClickReadMore = () => gtmEvent("Provisions popup click"); const gtmEventClickClose = () => gtmEvent("Provisions popup close"); @@ -23,13 +21,20 @@ const ProvisionsPopup = () => { const onClose = (event: React.MouseEvent) => { event.stopPropagation(); gtmEventClickClose(); - toggleModal(); - setIsProvisionsPopupOpen(false); + setIsOpenStorage(false); + }; + + const onReadMore = (event: React.MouseEvent) => { + event.stopPropagation(); + gtmEventClickReadMore(); + setIsOpenStorage(false); }; + if (!isOpenStorage) return; + return ( @@ -39,90 +44,87 @@ const ProvisionsPopup = () => { bottom="0" right="0" left="0" - display={isProvisionsPopupOpen ? "unset" : "none"} + display={isOpenStorage ? "unset" : "none"} backgroundColor="rgba(0,0,0,0.7)" onClick={onClose} + /> + - + + + + STRK Starknet Provisions + - + + + diff --git a/workspaces/website/src/components/ProvisionsPopup/popup-text.svg b/workspaces/website/src/components/ProvisionsPopup/popup-text.svg index 7451995c29..8611f47a9c 100644 --- a/workspaces/website/src/components/ProvisionsPopup/popup-text.svg +++ b/workspaces/website/src/components/ProvisionsPopup/popup-text.svg @@ -1,47 +1,50 @@ - + + d="M118.798 24.0328C117.943 23.0777 116.607 22.54 115.309 22.3194C114.001 22.1076 112.629 22.1273 111.337 22.3563C108.723 22.7977 106.349 23.8782 104.278 25.2111C103.202 25.8653 102.285 26.6222 101.335 27.393C100.877 27.7829 100.46 28.1981 100.025 28.6073L98.837 29.7872C97.5463 31.134 96.2742 32.3608 95.0433 33.3776C93.8074 34.3898 92.652 35.1585 91.5133 35.6953C90.3753 36.2349 89.1577 36.5523 87.5707 36.6031C85.9976 36.6584 84.1364 36.375 82.1455 35.9071C80.1439 35.4414 78.0421 34.7774 75.6934 34.2061C76.5129 36.4759 77.747 38.4817 79.3315 40.3153C80.9345 42.117 82.9362 43.7593 85.5077 44.8392C88.0421 45.9432 91.2269 46.3394 94.2049 45.7416C97.1907 45.1678 99.8109 43.7885 101.929 42.1933C104.052 40.5817 105.77 38.746 107.218 36.8375C107.618 36.3102 107.83 36.0151 108.119 35.603L108.919 34.4205C109.474 33.689 109.98 32.8562 110.53 32.1315C111.609 30.6137 112.672 29.0976 113.907 27.7009C114.529 26.9925 115.185 26.3149 115.959 25.6637C116.345 25.3458 116.762 25.0347 117.224 24.7545C117.693 24.4523 118.188 24.2157 118.798 24.0328Z" + fill="url(#paint0_linear_7774_1170)" /> - + - + - + + - -