Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiya1155 authored and calyptobai committed Jan 30, 2024
1 parent 859a94c commit e9a0a21
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
4 changes: 4 additions & 0 deletions client/src/Project/CurrentTabContent/DocTab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ const DocTab = ({
refreshStudio();
}, [refreshStudio]);

useEffect(() => {
setSelectedSections(initialSections || []);
}, [initialSections]);

useEffect(() => {
getIndexedPages(docId).then((resp) => {
const doc = resp.find((p) => p.relative_url === relativeUrl);
Expand Down
4 changes: 3 additions & 1 deletion client/src/context/providers/TabsContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ const TabsContextProvider = ({ children }: PropsWithChildren<Props>) => {
} else if (
previousTab.type === TabTypesEnum.DOC &&
newTab.type === TabTypesEnum.DOC &&
previousTab.studioId !== newTab.studioId
(previousTab.studioId !== newTab.studioId ||
previousTab.initialSections != newTab.initialSections)
) {
const previousTabIndex = prev.findIndex(
(t) => t.key === newTab.key,
Expand All @@ -183,6 +184,7 @@ const TabsContextProvider = ({ children }: PropsWithChildren<Props>) => {
const t = {
...previousTab,
studioId: newTab.studioId,
initialSections: newTab.initialSections,
};
newTabs[previousTabIndex] = t;
setActiveTabAction(t);
Expand Down
2 changes: 1 addition & 1 deletion client/src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -527,4 +527,4 @@
"Add documentation": "Agregar documentación",
"Usage resets at": "Restablecimiento de uso en",
"Restore session": "Restaurar sesion"
}
}
7 changes: 5 additions & 2 deletions client/src/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -504,5 +504,8 @@
"Usage resets at": "L'uso si ripristina a",
"Upgrade to Personal plan": "Aggiorna al piano personale",
"Restore session": "Ripristina la sessione",
"In this project": "In questo progetto"
}
"In this project": "In questo progetto",
"Existing studio conversations": "Conversazioni in studio esistenti",
"Select section": "Seleziona la sezione",
"Clear section": "Pulisci sezione"
}
3 changes: 2 additions & 1 deletion client/src/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -522,5 +522,6 @@
"Prompt": "迅速的",
"Usage resets at": "用法重置",
"Upgrade to Personal plan": "升级到个人计划",
"In this project": "在这个项目中"
"In this project": "在这个项目中",
"Existing studio conversations": "现有的工作室对话"
}

0 comments on commit e9a0a21

Please sign in to comment.