mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:47:20 +00:00
fix: only load history for logged-in users
This commit is contained in:
parent
2cba502f60
commit
85a032f87c
@ -38,12 +38,13 @@ export const CollectionHistoryProvider: React.FC = (props) => {
|
||||
});
|
||||
|
||||
const isAdminPage = location.pathname.startsWith('/admin');
|
||||
const token = api.auth.getToken() || '';
|
||||
|
||||
useEffect(() => {
|
||||
if (isAdminPage) {
|
||||
if (isAdminPage && token) {
|
||||
service.run();
|
||||
}
|
||||
}, [isAdminPage]);
|
||||
}, [isAdminPage, token]);
|
||||
|
||||
// 刷新 collecionHistory
|
||||
const refreshCH = async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user