fix #1469 and # 1475
This commit is contained in:
@@ -2,6 +2,7 @@ import { IDENTITIES, REGISTER_PERSON } from "@/graphql/actor";
|
||||
import {
|
||||
CURRENT_USER_CLIENT,
|
||||
LOGGED_USER,
|
||||
LOGGED_USER_LOCATION,
|
||||
SET_USER_SETTINGS,
|
||||
UPDATE_USER_LOCALE,
|
||||
USER_SETTINGS,
|
||||
@@ -51,6 +52,20 @@ export function useUserSettings() {
|
||||
return { loggedUser, error, loading };
|
||||
}
|
||||
|
||||
export function useUserLocation() {
|
||||
const {
|
||||
result: userSettingsResult,
|
||||
error,
|
||||
loading,
|
||||
onResult,
|
||||
} = useQuery<{ loggedUser: IUser }>(LOGGED_USER_LOCATION);
|
||||
|
||||
const location = computed(
|
||||
() => userSettingsResult.value?.loggedUser.settings.location
|
||||
);
|
||||
return { location, error, loading, onResult };
|
||||
}
|
||||
|
||||
export async function doUpdateSetting(
|
||||
variables: Record<string, unknown>
|
||||
): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user