Skip to content

Commit

Permalink
[#1584] Add resource view route to new layout & fix setLoginVisible
Browse files Browse the repository at this point in the history
  • Loading branch information
ifirmawan committed Sep 12, 2023
1 parent 22bbdc2 commit c8d7b1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions frontend/src/pages/_app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function MyApp({ Component, pageProps }) {
'/landing',
'/onboarding',
'/knowledge/library/[[...slug]]',
'/[type]/[id]'
]
if (!newLayoutRoutes.includes(router.pathname)) {
import('../main.scss')
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/pages/knowledge/library/[[...slug]].js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import KnowledgeLib from "../../../modules/knowledge-lib/view";
import { UIStore } from "../../../store";
import api from "../../../utils/api";

function KnowledgeLibrary({ isAuthenticated }) {
function KnowledgeLibrary({ isAuthenticated, setLoginVisible }) {
const { landing } = UIStore.useState((s) => ({
landing: s.landing,
}));
Expand All @@ -25,7 +25,12 @@ function KnowledgeLibrary({ isAuthenticated }) {
// }
// }, []);

return <KnowledgeLib isAuthenticated={isAuthenticated} />;
return (
<KnowledgeLib
isAuthenticated={isAuthenticated}
setLoginVisible={setLoginVisible}
/>
);
}

export default KnowledgeLibrary;

0 comments on commit c8d7b1c

Please # to comment.