hide right column in some views

This commit is contained in:
Martti Malmi
2023-11-26 16:50:05 +02:00
parent 8bc323489e
commit 0434ae43d8
3 changed files with 11 additions and 5 deletions

View File

@ -29,7 +29,9 @@ export default function Index() {
useLoginFeed();
const hideHeaderPaths = ["/login", "/new"];
const hideRightColumnPaths = ["/login", "/new", "/messages", "/settings"];
const shouldHideHeader = hideHeaderPaths.some(path => location.pathname.startsWith(path));
const shouldHideRightColumn = hideRightColumnPaths.some(path => location.pathname.startsWith(path));
const pageClassPaths = useMemo(
() => ({
@ -67,7 +69,7 @@ export default function Index() {
<Outlet />
</ErrorBoundary>
</div>
<RightColumn />
<RightColumn show={!shouldHideRightColumn} />
</div>
<div className="md:hidden">
<NoteCreatorButton className="note-create-button" />