mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(blotter): render on multiboard feeds
This commit is contained in:
@@ -308,10 +308,16 @@ describe('App', () => {
|
||||
expect(container.querySelector('[data-testid="post-form"]')).toBeTruthy();
|
||||
expect(container.querySelector('[data-testid="feed-cache-container"]')).toBeTruthy();
|
||||
expect(container.querySelector('[data-testid="desktop-board-buttons"]')).toBeTruthy();
|
||||
expect(container.querySelector('[data-testid="board-blotter"]')).toBeNull();
|
||||
expect(container.querySelector('[data-testid="board-blotter"]')).toBeTruthy();
|
||||
expect(latestLocation).toBe('/all/settings');
|
||||
});
|
||||
|
||||
it.each(['/all', '/subs', '/mod'])('renders board blotter on desktop multiboard route %s', async (route) => {
|
||||
await renderApp(route);
|
||||
|
||||
expect(container.querySelector('[data-testid="board-blotter"]')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('redirects board page 1 feeds to not-found', async () => {
|
||||
await renderApp('/mu/1');
|
||||
|
||||
|
||||
+2
-1
@@ -82,6 +82,7 @@ const BoardLayout = () => {
|
||||
const isOnModQueueRoute = isModQueueRoute(pathname);
|
||||
const isOnArchiveRoute = isArchiveRoute(pathname);
|
||||
const shouldRenderOutlet = isOnPostRoute || isOnPendingPostRoute || isOnModQueueRoute || isOnArchiveRoute;
|
||||
const shouldRenderBoardBlotter = !isOnArchiveRoute && !isOnModQueueRoute;
|
||||
const isInCatalogView = isCatalogView(pathname, params);
|
||||
// Christmas theme
|
||||
const { isEnabled: isSpecialEnabled } = useSpecialThemeStore();
|
||||
@@ -164,7 +165,7 @@ const BoardLayout = () => {
|
||||
!isOnArchiveRoute && (
|
||||
<>
|
||||
<PostForm key={key} />
|
||||
{!(isInAllView || isInSubscriptionsView || isInModView) && !isOnModQueueRoute && <BoardBlotter />}
|
||||
{shouldRenderBoardBlotter ? <BoardBlotter /> : null}
|
||||
<DesktopBoardButtons />
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user