Skip to content

Commit 9e28b51

Browse files
fix(space):empty effect dependencies
1 parent 1b6525f commit 9e28b51

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

lumium-space/pages/[workspaceId]/index.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ const NavItem = ({ icon, children, ...rest }: NavItemProps) => {
150150
interface MobileProps extends FlexProps {
151151
onOpen: () => void;
152152
}
153+
153154
const MobileNav = ({ onOpen, ...rest }: MobileProps) => {
154155
return (
155156
<Flex
@@ -232,13 +233,16 @@ const Workspace: React.FC = () => {
232233
const router = useRouter();
233234
const { workspaceId } = router.query;
234235
const workspace = useWorkspace(workspaceId);
235-
const { userInfo }= useUserInfo();
236+
const { userInfo } = useUserInfo();
236237

237238
return (
238239
<SidebarWithHeader>
239-
<Heading>
240-
Welcome to the <em>{workspace?.name}</em> workspace, {userInfo?.nickName}!
241-
</Heading>
240+
{
241+
(workspace?.name && userInfo?.nickName) &&
242+
<Heading>
243+
Welcome to the <em>{workspace?.name}</em> workspace, {userInfo?.nickName}!
244+
</Heading>
245+
}
242246
{
243247
workspace?.pages.map((p) => {
244248
return (

lumium-space/pages/spaces/[[...path]].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const Spaces: React.FC = () => {
2222
Router.push(AUTH_SIGNIN);
2323
}
2424
});
25-
});
25+
}, []);
2626

2727
return null;
2828
}

0 commit comments

Comments
 (0)