import { queryOptions } from '@tanstack/react-query';
import Api from '../api/Api';

export const profileSelfQueryOptions = queryOptions({
  queryKey: ['profile'],
  queryFn: () => Api.user(),
});

export const profileQueryOptions = (id?: number) =>
  queryOptions({
    queryKey: ['profile', { id }],
    queryFn: () => Api.user(id),
  });
