mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Bookmarks: Do not query preferences if no user logged in (#93840)
This commit is contained in:
parent
80adb74205
commit
1418e88695
@ -4,7 +4,7 @@ import { config } from '@grafana/runtime';
|
||||
import { useGetUserPreferencesQuery } from 'app/features/preferences/api';
|
||||
|
||||
export const usePinnedItems = () => {
|
||||
const preferences = useGetUserPreferencesQuery();
|
||||
const preferences = useGetUserPreferencesQuery(undefined, { skip: !config.bootData.user.isSignedIn });
|
||||
const pinnedItems = useMemo(() => preferences.data?.navbar?.bookmarkUrls || [], [preferences]);
|
||||
|
||||
if (config.featureToggles.pinNavItems) {
|
||||
|
Loading…
Reference in New Issue
Block a user