Live event page

This commit is contained in:
2023-06-18 14:14:34 +01:00
parent adaa8a71e7
commit 769e093663
11 changed files with 168 additions and 18 deletions

View File

@ -43,7 +43,7 @@ export default function Layout() {
};
const shouldHideNoteCreator = useMemo(() => {
const hideOn = ["/settings", "/messages", "/new", "/login", "/donate", "/p/", "/e", "/subscribe"];
const hideOn = ["/settings", "/messages", "/new", "/login", "/donate", "/p/", "/e", "/subscribe", "/live"];
return isReplyNoteCreatorShowing || hideOn.some(a => location.pathname.startsWith(a));
}, [location, isReplyNoteCreatorShowing]);
@ -53,9 +53,10 @@ export default function Layout() {
}, [location]);
useEffect(() => {
const widePage = ["/login", "/messages"];
const widePage = ["/login", "/messages", "/live"];
const noScroll = ["/messages", "/live"];
if (widePage.some(a => location.pathname.startsWith(a))) {
setPageClass("");
setPageClass(noScroll.some(a => location.pathname.startsWith(a)) ? "scroll-lock" : "");
} else {
setPageClass("page");
}