Skip to content

Commit 4ed8eef

Browse files
authored
Merge pull request #489 from easyops-cn/steve/no-projects
fix(): do not fetch projects if not configured to show projects
2 parents 6c3a51c + 3012ed8 commit 4ed8eef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bricks/ai-portal/src/elevo-sidebar/ChatHistory.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ export function LowLevelChatHistory(
151151
);
152152

153153
useEffect(() => {
154+
if (!showProjects) {
155+
return;
156+
}
154157
(async () => {
155158
try {
156159
const projects = await ElevoApi_getElevoProjects({
@@ -165,7 +168,7 @@ export function LowLevelChatHistory(
165168
setProjects([]);
166169
}
167170
})();
168-
}, []);
171+
}, [showProjects]);
169172

170173
useEffect(() => {
171174
Promise.all([

0 commit comments

Comments
 (0)