Skip to content

Commit

Permalink
fix(client): fix sidebar condition
Browse files Browse the repository at this point in the history
fixes: #457
  • Loading branch information
hiroppy committed Mar 25, 2021
1 parent ba72573 commit 643987c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/client/src/hooks/useSidebarComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ export function useSidebarComponent(mode) {

useEffect(() => {
(async () => {
if (mode === 'common') {
const params = getSearchParams();
const isSidebar = params.get('sidebar') !== 'false' || process.env.UI.SIDEBAR === 'true';
const params = getSearchParams();

if (isSidebar) {
if (mode === 'common' && params.get('sidebar') !== 'false') {
if (process.env.UI.SIDEBAR === true) {
const { Sidebar: SidebarComponent } = await import(
/* webpackPrefetch: true */ '../components/Sidebar'
);
Expand Down

0 comments on commit 643987c

Please sign in to comment.