mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-22 10:51:46 +03:00
a4a2d769b3
* feat: refetch brains list on when new brain is added * feat: update BrainConfig type * feat: update useSettingsTab add usebrainFormState and useSettings tab * feat: add <PrivateAccessConfirmationModal/> modal * feat: update translations * feat: handle brain status change to private * feat: validate chat access * test: fix failaing tests and remove deprecated
19 lines
440 B
TypeScript
19 lines
440 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
|
|
import { USER_DATA_KEY } from "../api/user/config";
|
|
import { useUserApi } from "../api/user/useUserApi";
|
|
|
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
export const useUserData = () => {
|
|
const { getUser } = useUserApi();
|
|
|
|
const { data: userData } = useQuery({
|
|
queryKey: [USER_DATA_KEY],
|
|
queryFn: getUser,
|
|
});
|
|
|
|
return {
|
|
userData,
|
|
};
|
|
};
|