Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | import { parse } from "cookie";
import { TextButton } from "../Button";
import { CloseIcon } from "../../lib/SvgComponents";
function PreviewBanner() {
const { qpp_is_preview_mode: isPreviewMode = null } = parse(document.cookie);
if (isPreviewMode === "true") {
return (
<div className="qpp-u-display--flex qpp-u-justify-content--between qpp-u-fill--gold-20 qpp-u-padding-x--40 qpp-u-padding-y--24 qpp-u-font-size--14 qpp-u-color--gray-80">
<div>YOU ARE IN PREVIEW MODE</div>
<TextButton href="/preview-mode" className="qpp-u-color--gray-80">
Exit Preview Mode
<CloseIcon />
</TextButton>
</div>
);
}
return null;
}
export default PreviewBanner;
|