import Cookies from "js-cookie"; import * as React from "react"; import Speakerphone from "@/components/icons/speakerphone.svg"; const cookieName = "legacy-poll-notice"; const LegacyPollNotice: React.VoidFunctionComponent<{ show?: boolean }> = ({ show, }) => { const [visible, setVisible] = React.useState(show); if (!visible) { return null; } const didSeeLegacyPollNotice = !!Cookies.get(cookieName); if (didSeeLegacyPollNotice) { return null; } const setCookie = () => { setVisible(false); Cookies.set(cookieName, "1", { expires: 60, }); }; return (
Notice anything different? We've announced a new version release.
setCookie()} className="btn-default border-0" href="https://blog.rallly.co/posts/new-version-announcment" > Read more
); }; export default LegacyPollNotice;