Skip to content

Commit 8f5304d

Browse files
committed
fix(get-workspaces-projects): projects list must be always linked to activeWs
1 parent 393b1c9 commit 8f5304d

File tree

7 files changed

+22
-19
lines changed

7 files changed

+22
-19
lines changed

generate-devel-token copy.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"url": "https://dev.unguess.io/api",
3+
"username": "luca.cannarozzo@unguess.io",
4+
"password": "$Uh(5RCbY7owNAeu#h"
5+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.4.0",
44
"private": true,
55
"dependencies": {
6-
"@appquality/unguess-design-system": "3.1.2-nav-beta",
6+
"@appquality/unguess-design-system": "3.1.2",
77
"@headwayapp/react-widget": "^0.0.4",
88
"@reduxjs/toolkit": "^1.8.0",
99
"@rtk-query/codegen-openapi": "^1.0.0-alpha.1",
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

src/common/components/navigation/sidebar/index.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const AppSidebar = (props: PropsWithChildren<SidebarProps>) => {
4646
const prjRef = useRef<HTMLButtonElement>(null);
4747

4848
const {
49-
data: projects,
49+
currentData: projects,
5050
isLoading,
5151
isFetching,
5252
} = useGetWorkspacesByWidProjectsQuery(
@@ -58,9 +58,7 @@ export const AppSidebar = (props: PropsWithChildren<SidebarProps>) => {
5858

5959
const isMobile = isMaxMedia(appTheme.breakpoints.sm);
6060

61-
const navigateTo = (navRoute: string, parameter?: string) => {
62-
const destination = navRoute + (parameter ? `/${parameter}` : '');
63-
61+
const navigateTo = (destination: string, parameter?: string) => {
6462
let localizedRoute = '';
6563
if (destination === 'home') {
6664
localizedRoute = i18n.language === 'en' ? '/' : `/${i18n.language}`;
@@ -80,8 +78,6 @@ export const AppSidebar = (props: PropsWithChildren<SidebarProps>) => {
8078
}
8179

8280
navigate(localizedRoute, { replace: true });
83-
84-
// setNav(destination);
8581
};
8682

8783
useEffect(() => {
@@ -93,6 +89,8 @@ export const AppSidebar = (props: PropsWithChildren<SidebarProps>) => {
9389
}
9490
}, [isSidebarOpen]);
9591

92+
console.log('route', route);
93+
9694
const isLoadingOrFetching = isLoading || isFetching;
9795

9896
return isLoadingOrFetching ? (
@@ -127,12 +125,12 @@ export const AppSidebar = (props: PropsWithChildren<SidebarProps>) => {
127125
>
128126
<NavAccordionItem.Section>
129127
<NavAccordionItem.Header>
128+
<ProjectsIcon />
130129
<NavAccordionItem.Label>
131-
<ProjectsIcon />
132130
{t('__APP_SIDEBAR_PROJECTS_DIVIDER_LABEL')}{' '}
133131
</NavAccordionItem.Label>
134132
</NavAccordionItem.Header>
135-
<NavAccordionItem.Panel>
133+
<NavAccordionItem.Panel style={{ padding: 0 }}>
136134
{projects.items.map((project) => (
137135
<NavItemProject
138136
className="sidebar-project-item"

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747
ajv-draft-04 "^1.0.0"
4848
call-me-maybe "^1.0.1"
4949

50-
"@appquality/unguess-design-system@3.1.2-nav-beta":
51-
version "3.1.2-nav-beta"
52-
resolved "https://registry.yarnpkg.com/@appquality/unguess-design-system/-/unguess-design-system-3.1.2-nav-beta.tgz#3c53ffe27893a1c044575fc038e30bb840f5a422"
53-
integrity sha512-Rq63az4/Vlr14kPHThGrAHyVOx8/o3tsB1BMWzjCzGY23Rj4RkxLiTi6iGovt7ITcVAskJgLKF4t/pyZwYglUQ==
50+
"@appquality/unguess-design-system@3.1.2":
51+
version "3.1.2"
52+
resolved "https://registry.yarnpkg.com/@appquality/unguess-design-system/-/unguess-design-system-3.1.2.tgz#a4ad6c6d06ba01a0b5c5a8f542b94126974d8bd0"
53+
integrity sha512-ke3y9/xO7/9HSkIGcJ6WQCA4gUuUkJAFzszV6RcmC34E+iG2+4/3bU1FBF+tVzCzNqfw5d0n4xQiE1AjnAMTCg==
5454
dependencies:
5555
"@nivo/bar" "^0.80.0"
5656
"@nivo/bullet" "^0.80.0"

0 commit comments

Comments
 (0)