Skip to content

Commit

Permalink
Merge branch 'dev' into qa
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Feb 20, 2025
2 parents 4fb61b4 + 7bb89b2 commit 1b2e16c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/app/(main)/settings/teams/TeamJoinForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { useApi, useMessages, useModified } from '@/components/hooks';

export function TeamJoinForm({ onSave, onClose }: { onSave: () => void; onClose: () => void }) {
const { formatMessage, labels, getMessage } = useMessages();
const { formatMessage, labels } = useMessages();
const { post, useMutation } = useApi();
const { mutate, error } = useMutation({ mutationFn: (data: any) => post('/teams/join', data) });
const ref = useRef(null);
Expand All @@ -28,7 +28,7 @@ export function TeamJoinForm({ onSave, onClose }: { onSave: () => void; onClose:
};

return (
<Form ref={ref} onSubmit={handleSubmit} error={error && getMessage(error)}>
<Form ref={ref} onSubmit={handleSubmit} error={error}>
<FormRow label={formatMessage(labels.accessCode)}>
<FormInput name="accessCode" rules={{ required: formatMessage(labels.required) }}>
<TextField autoComplete="off" />
Expand Down
4 changes: 2 additions & 2 deletions src/app/login/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Logo from '@/assets/logo.svg';
import styles from './LoginForm.module.css';

export function LoginForm() {
const { formatMessage, labels, getMessage } = useMessages();
const { formatMessage, labels } = useMessages();
const router = useRouter();
const { post, useMutation } = useApi();
const { mutate, error, isPending } = useMutation({
Expand All @@ -40,7 +40,7 @@ export function LoginForm() {
<Logo />
</Icon>
<div className={styles.title}>umami</div>
<Form className={styles.form} onSubmit={handleSubmit} error={getMessage(error)}>
<Form className={styles.form} onSubmit={handleSubmit} error={error}>
<FormRow label={formatMessage(labels.username)}>
<FormInput
data-test="input-username"
Expand Down
4 changes: 2 additions & 2 deletions src/queries/prisma/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ export async function getUsers(
criteria: UserFindManyArgs,
pageParams?: PageParams,
): Promise<PageResult<User[]>> {
const { query } = pageParams;
const { search } = pageParams;

const where: Prisma.UserWhereInput = {
...criteria.where,
...prisma.getSearchParameters(query, [{ username: 'contains' }]),
...prisma.getSearchParameters(search, [{ username: 'contains' }]),
deletedAt: null,
};

Expand Down

0 comments on commit 1b2e16c

Please sign in to comment.