Skip to content

Commit ce0008b

Browse files
authored
Merge pull request #673 from actiontech/fix/issue-3063
[fix](base/App): Remove token dependency for basic info reqeust
2 parents 7103737 + 458bac1 commit ce0008b

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

packages/base/src/App.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ describe('App', () => {
214214
routerProps: { initialEntries: ['/exec-workflow?query=test'] }
215215
});
216216

217-
expect(requestGetBasicInfo).toHaveBeenCalledTimes(0);
217+
expect(requestGetBasicInfo).toHaveBeenCalledTimes(1);
218218
expect(getUserBySessionSpy).toHaveBeenCalledTimes(0);
219219
expect(mockDBServiceDriverInfo.updateDriverList).toHaveBeenCalledTimes(0);
220220
expect(navigateSpy).toHaveBeenCalledTimes(1);

packages/base/src/App.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,12 @@ function App() {
128128

129129
// #if [ee]
130130
const { syncWebTitleAndLogo } = useSystemConfig();
131-
useRequest(
132-
() =>
133-
BasicInfo.GetBasicInfo().then((res) => {
134-
if (res.data.data) {
135-
syncWebTitleAndLogo(res.data.data);
136-
}
137-
}),
138-
{
139-
ready: !!token
140-
}
131+
useRequest(() =>
132+
BasicInfo.GetBasicInfo().then((res) => {
133+
if (res.data.data) {
134+
syncWebTitleAndLogo(res.data.data);
135+
}
136+
})
141137
);
142138
// #endif
143139

0 commit comments

Comments
 (0)