Skip to content

Commit

Permalink
fix(space):empty effect dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricschwyter committed Dec 29, 2022
1 parent 1b6525f commit 9e28b51
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions lumium-space/pages/[workspaceId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ const NavItem = ({ icon, children, ...rest }: NavItemProps) => {
interface MobileProps extends FlexProps {
onOpen: () => void;
}

const MobileNav = ({ onOpen, ...rest }: MobileProps) => {
return (
<Flex
Expand Down Expand Up @@ -232,13 +233,16 @@ const Workspace: React.FC = () => {
const router = useRouter();
const { workspaceId } = router.query;
const workspace = useWorkspace(workspaceId);
const { userInfo }= useUserInfo();
const { userInfo } = useUserInfo();

return (
<SidebarWithHeader>
<Heading>
Welcome to the <em>{workspace?.name}</em> workspace, {userInfo?.nickName}!
</Heading>
{
(workspace?.name && userInfo?.nickName) &&
<Heading>
Welcome to the <em>{workspace?.name}</em> workspace, {userInfo?.nickName}!
</Heading>
}
{
workspace?.pages.map((p) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion lumium-space/pages/spaces/[[...path]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Spaces: React.FC = () => {
Router.push(AUTH_SIGNIN);
}
});
});
}, []);

return null;
}
Expand Down

0 comments on commit 9e28b51

Please sign in to comment.