Skip to content

Commit

Permalink
Merge pull request #331 from cofacts/search-page
Browse files Browse the repository at this point in the history
Remove ArticlePageLayout from search page
  • Loading branch information
MrOrz authored Sep 22, 2020
2 parents d24e51f + 986f339 commit 2444bc2
Show file tree
Hide file tree
Showing 7 changed files with 461 additions and 714 deletions.
11 changes: 9 additions & 2 deletions components/AppLayout/AppLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ const apiLogout = () => {
return fetchAPI('/logout').then(resp => resp.json());
};

function AppLayout({ children }) {
/**
* @param {boolean} props.container - whether we should use container around children
*/
function AppLayout({ children, container = true }) {
const [isRouteChanging, setRouteChanging] = useState(false);
const [sidebarOpen, setSidebarOpen] = useState(false);
const [loginModalOpen, setLoginModalOpen] = useState(false);
Expand Down Expand Up @@ -89,7 +92,11 @@ function AppLayout({ children }) {
user={data?.GetUser}
onLoginModalOpen={openLoginModal}
/>
<Container className={classes.container}>{children}</Container>
{container ? (
<Container className={classes.container}>{children}</Container>
) : (
children
)}
<AppFooter />
{loginModalOpen && (
<LoginModal onClose={() => setLoginModalOpen(false)} />
Expand Down
356 changes: 0 additions & 356 deletions components/ArticlePageLayout.js

This file was deleted.

2 changes: 2 additions & 0 deletions components/ListPageControls/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Tools from './Tools';
import Filters from './Filters';
import BaseFilter from './BaseFilter';
import ArticleStatusFilter from './ArticleStatusFilter';
import CategoryFilter from './CategoryFilter';
import ReplyTypeFilter from './ReplyTypeFilter';
Expand All @@ -10,6 +11,7 @@ import LoadMore from './LoadMore';
export {
Tools,
Filters,
BaseFilter,
ArticleStatusFilter,
CategoryFilter,
ReplyTypeFilter,
Expand Down
Loading

0 comments on commit 2444bc2

Please sign in to comment.