Skip to content

Commit

Permalink
fix: add authenticator to workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
ReddixT committed Dec 30, 2022
1 parent 9e28b51 commit cce3d04
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions lumium-space/pages/[workspaceId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import {
} from 'react-icons/fi';
import { IconType } from 'react-icons';
import { ReactText } from 'react';
import { Authenticator } from '@components/security/Authenticator';

interface LinkItemProps {
name: string;
Expand Down Expand Up @@ -236,21 +237,23 @@ const Workspace: React.FC = () => {
const { userInfo } = useUserInfo();

return (
<SidebarWithHeader>
{
(workspace?.name && userInfo?.nickName) &&
<Authenticator>
<SidebarWithHeader>
{
(workspace?.name && userInfo?.nickName) &&
<Heading>
Welcome to the <em>{workspace?.name}</em> workspace, {userInfo?.nickName}!
</Heading>
}
{
workspace?.pages.map((p) => {
return (
<Button key={p.id} onClick={() => router.push(p.id)}></Button>
);
})
}
</SidebarWithHeader>
}
{
workspace?.pages.map((p) => {
return (
<Button key={p.id} onClick={() => router.push(p.id)}></Button>
);
})
}
</SidebarWithHeader>
</Authenticator>
);
};

Expand Down

0 comments on commit cce3d04

Please sign in to comment.