Skip to content

Commit

Permalink
jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarman committed Jul 2, 2024
1 parent 4e92406 commit 75ff676
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/pages/Users/api/useGetUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@ import { useConfig } from 'common/hooks/useConfig';
import { User } from 'common/models/user';
import { QueryKey } from 'common/utils/constants';

/**
* Properties for the `useGetUser` API hook.
* @param {string} userId - A `User` identifier.
*/
interface UseGetUserProps {
userId: string;
}

/**
* An API hook which fetches a single `User` object.
* @param {UseGetUserProps} props - Hook properties.
* @returns Returns a `UseQueryResult` with `User` data.
*/
export const useGetUser = ({ userId }: UseGetUserProps) => {
const config = useConfig();

Expand Down
4 changes: 4 additions & 0 deletions src/pages/Users/api/useGetUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import { useConfig } from 'common/hooks/useConfig';
import { User } from 'common/models/user';
import { QueryKey } from 'common/utils/constants';

/**
* An API hook which fetches a collection of `User` objects.
* @returns Returns a `UseQueryResult` with `User` collection data.
*/
export const useGetUsers = () => {
const config = useConfig();

Expand Down

0 comments on commit 75ff676

Please sign in to comment.