Skip to content

Commit 9c5b18a

Browse files
committed
sidebar and member update
1 parent 98b16c3 commit 9c5b18a

File tree

14 files changed

+37
-145
lines changed

14 files changed

+37
-145
lines changed

src/api/session/signUpApi.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ interface NewAccount {
1212
userId: string;
1313
username: string;
1414
fullName: any;
15-
email: string;
1615
password: string;
1716
token: string;
1817
}
@@ -31,7 +30,6 @@ const signUpApi = ({ account }: Params): Promise<void> =>
3130
data: JSON.stringify({
3231
name: account.username,
3332
full_name: account.fullName,
34-
email: account.email,
3533
password: account.password,
3634
activation_token: account.token
3735
}),

src/redux/actions/session/signupAction.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import signUpApi from '../../../api/session/signUpApi';
44
export const signUpAction = ({
55
userId,
66
username,
7-
email,
87
fullName,
98
password,
109
token,
@@ -13,7 +12,6 @@ export const signUpAction = ({
1312
}: {
1413
userId: string;
1514
username: string;
16-
email: string;
1715
fullName: string;
1816
password: string;
1917
token: any;
@@ -32,7 +30,6 @@ export const signUpAction = ({
3230
account: {
3331
userId,
3432
username,
35-
email,
3633
fullName,
3734
password,
3835
token,

src/ui/layouts/common/layouts/AuthenticatedLayout/AuthenticatedSidebar/Menu/MenuItem.module.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ $bgColor: rgba(201, 203, 208, 0.2);
66
display: block;
77
text-decoration: none;
88
border-radius: 4px;
9-
height: 40px !important;
109
text-decoration: none;
1110
}
1211

src/ui/layouts/common/layouts/AuthenticatedLayout/AuthenticatedSidebar/Menu/MenuItem.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,17 @@ export const MenuItem: React.FC<{
2525
to={to}
2626
exact={exact}
2727
>
28-
<FlexBox alignItems="center" paddingVertical="sm" marginVertical="sm">
28+
<FlexBox alignItems="center" marginVertical="sm" style={{ height: '40px' }}>
2929
<Box
30-
className={cn(
30+
className={cn(
3131
to === location.pathname && !subItem
3232
? styles.menuItemSideBox
3333
: styles.menuItemSideBoxUn,
3434
)}
3535
></Box>
3636

3737
<FlexBox style={{ width: '100%' }}>
38-
<Box paddingLeft={subItem ? 'xl' : 'md'}>
39-
<Icon />
40-
</Box>
38+
<Box paddingLeft={subItem ? 'xl' : 'md'}><Icon /></Box>
4139
<Box paddingLeft="md">
4240
<Paragraph color="darkGrey" size="small">
4341
{camelCaseToParagraph(text)}

src/ui/layouts/common/layouts/AuthenticatedLayout/AuthenticatedSidebar/Menu/index.tsx

Lines changed: 21 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ export const Menu: React.FC = () => {
5656
to={routePaths.stacks.list}
5757
text={translate('menu.stacks.text')}
5858
/>
59+
5960
<MenuItem
6061
isActive={() => {
6162
return !!matchPath(locationPath, {
62-
path: routePaths.stackComponents.base(':id'),
63+
path: routePaths.stackComponents.base(''),
6364
exact: false,
6465
});
6566
}}
@@ -72,46 +73,28 @@ export const Menu: React.FC = () => {
7273
text={translate('menu.stackComponents.text')}
7374
/>
7475

75-
{locationPath.includes('components') && (
76-
<div>
77-
{stackComponentsTypes?.map((item) => (
78-
<MenuItem
79-
isActive={() => {
80-
return !!matchPath(locationPath, {
81-
path: routePaths.stackComponents.base(item),
82-
exact: false,
83-
});
84-
}}
85-
subItem={true}
86-
Icon={() => (
87-
<icons.stackComponent
88-
color={iconColors.white}
89-
size={iconSizes.md}
90-
/>
91-
)}
92-
to={routePaths.stackComponents.base(item)}
93-
text={item}
94-
/>
95-
)
96-
)}
97-
</div>
98-
)}
99-
100-
{/* <MenuItem
101-
// isActive={() => {
102-
// return !!matchPath(locationPath, {
103-
// path: routePaths.stackComponents.base(item),
104-
// exact: false,
105-
// });
106-
// }}
76+
{locationPath.includes('components') &&
77+
stackComponentsTypes?.map((item) => (
78+
<MenuItem
79+
isActive={() => {
80+
return !!matchPath(locationPath, {
81+
path: routePaths.stackComponents.base(item),
82+
exact: false,
83+
});
84+
}}
10785
subItem={true}
10886
Icon={() => (
109-
<icons.data color={iconColors.darkGrey} size={iconSizes.md} />
87+
<icons.stackComponent
88+
color={iconColors.white}
89+
size={iconSizes.md}
90+
/>
11091
)}
111-
to={routePaths.stackComponents.base(stackComponentsTypes[0])}
112-
text={translate('menu.stackComponents.text')}
113-
/> */}
114-
92+
to={routePaths.stackComponents.base(item)}
93+
text={item}
94+
/>
95+
)
96+
)}
97+
11598
{/* <MenuItem
11699
Icon={() => (
117100
<icons.settings color={iconColors.white} size={iconSizes.md} />

src/ui/layouts/common/layouts/AuthenticatedLayout/AuthenticatedSidebar/SideFooter/MenuItemExternal.module.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ $bgColor: rgba(201, 203, 208, 0.2);
1111
display: block;
1212
text-decoration: none;
1313
border-radius: 4px;
14-
height: 40px
1514
}
1615

1716
.menuItem,

src/ui/layouts/common/layouts/AuthenticatedLayout/AuthenticatedSidebar/SideFooter/MenuItemExternal.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ export const MenuItemExternal: React.FC<{
1111

1212
return (
1313
<Box className={styles.menuItem} style={{ marginLeft: '6px' }}>
14-
<FlexBox alignItems="center" marginVertical="sm">
14+
<FlexBox alignItems="center" paddingVertical="sm" marginVertical="sm" >
15+
1516
<FlexBox style={{ width: '100%' }}>
16-
1717
<Box paddingLeft={subItem ? 'xl' : 'md'}><Icon /></Box>
18-
1918
<Box paddingLeft="md">
2019
<a
2120
target="__blank"

src/ui/layouts/common/layouts/AuthenticatedLayout/AuthenticatedSidebar/SideFooter/index.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,13 @@ export const SideFooter: React.FC = () => {
5353
<MenuItem
5454
Icon={() => (
5555
<icons.settings color={iconColors.white} size={iconSizes.md} />
56-
)} to={routePaths.settings.personalDetails} text={translate('menu.setting.text')} />
56+
)} to={routePaths.settings.personalDetails} text={translate('menu.setting.text')}
57+
/>
5758

58-
<Box style={{ paddingLeft: '12px' }} paddingTop="md" paddingBottom='lg' >
59-
<Paragraph color='white' style={{ fontSize: '8px', fontWeight: 400 }}>UI Version v{process.env.REACT_APP_VERSION}</Paragraph>
60-
<Paragraph color='white' style={{ fontSize: '8px', fontWeight: 400 }}>ZenML v{apiVersion}</Paragraph>
61-
</Box>
59+
<Box style={{ paddingLeft: '12px' }} paddingTop="md" paddingBottom='xs' >
60+
<Paragraph color='white' style={{ fontSize: '8px', fontWeight: 400 }}>UI Version v{process.env.REACT_APP_VERSION}</Paragraph>
61+
<Paragraph color='white' style={{ fontSize: '8px', fontWeight: 400 }}>ZenML v{apiVersion}</Paragraph>
62+
</Box>
6263
</>
6364
);
6465
};

src/ui/layouts/common/layouts/AuthenticatedLayout/AuthenticatedSidebar/index.module.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ $bgColor: rgba(201, 203, 208, 0.2);
55
.sidebar {
66
width: 24rem !important;
77
// height: calc(100vh - #{$headerHeight});
8-
// background-color: $bgColor;
9-
108
height: 100vh;
119
background: linear-gradient(180deg, #433E99 0%, #8F599D 100%);
1210
}
@@ -35,4 +33,4 @@ $bgColor: rgba(201, 203, 208, 0.2);
3533
.mobileSidebarOpen {
3634
transform: translateX(0);
3735
}
38-
}
36+
}

src/ui/layouts/common/layouts/AuthenticatedLayout/index.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ export const AuthenticatedLayout: React.FC = ({ children }) => {
1010
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
1111

1212
return (
13-
<>
14-
{/* <AuthenticatedHeader setMobileMenuOpen={setMobileMenuOpen} />
15-
<FlexBox>
16-
<AuthenticatedSidebar
17-
setMobileMenuOpen={setMobileMenuOpen}
18-
mobileMenuOpen={mobileMenuOpen}
19-
/>
20-
<FlexBox className={styles.content} flex={1}>
21-
{children}
22-
</FlexBox>
23-
</FlexBox> */}
24-
2513
<FlexBox>
2614
<AuthenticatedSidebar setMobileMenuOpen={setMobileMenuOpen} mobileMenuOpen={mobileMenuOpen} />
2715
<FlexBox flexDirection='column' className={styles.content} flex={1}>
@@ -31,6 +19,5 @@ export const AuthenticatedLayout: React.FC = ({ children }) => {
3119
</FlexBox>
3220
</FlexBox>
3321
</FlexBox>
34-
</>
3522
);
3623
};

0 commit comments

Comments
 (0)