Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Mike Cao 2024-03-11 20:58:43 -07:00
commit 14cd549e1b
4 changed files with 8 additions and 27 deletions

View File

@ -1,10 +1,9 @@
import classNames from 'classnames';
import { useMessages, useNavigation } from 'components/hooks';
import { safeDecodeURIComponent } from 'next-basics';
import Link from 'next/link';
import { ReactNode } from 'react';
import { Icon, Icons } from 'react-basics';
import classNames from 'classnames';
import Link from 'next/link';
import { safeDecodeURI } from 'next-basics';
import { useNavigation } from 'components/hooks';
import { useMessages } from 'components/hooks';
import styles from './FilterLink.module.css';
export interface FilterLinkProps {
@ -40,7 +39,7 @@ export function FilterLink({
{!value && `(${label || formatMessage(labels.unknown)})`}
{value && (
<Link href={renderUrl({ [id]: value })} className={styles.label} replace>
{safeDecodeURI(label || value)}
{safeDecodeURIComponent(label || value)}
</Link>
)}
{externalUrl && (

View File

@ -11,26 +11,15 @@ export interface TeamWebsiteRequestQuery extends SearchFilter {
teamId: string;
}
export interface TeamWebsiteRequestBody {
name: string;
domain: string;
shareId: string;
}
const schema = {
GET: yup.object().shape({
teamId: yup.string().uuid().required(),
...pageInfo,
}),
POST: yup.object().shape({
name: yup.string().max(100).required(),
domain: yup.string().max(500).required(),
shareId: yup.string().max(50).nullable(),
}),
};
export default async (
req: NextApiRequestQueryBody<TeamWebsiteRequestQuery, TeamWebsiteRequestBody>,
req: NextApiRequestQueryBody<TeamWebsiteRequestQuery, any>,
res: NextApiResponse,
) => {
await useAuth(req, res);

View File

@ -10,12 +10,6 @@ export interface UserTeamsRequestQuery extends SearchFilter {
userId: string;
}
export interface UserTeamsRequestBody {
name: string;
domain: string;
shareId: string;
}
const schema = {
GET: yup.object().shape({
userId: yup.string().uuid().required(),
@ -24,7 +18,7 @@ const schema = {
};
export default async (
req: NextApiRequestQueryBody<UserTeamsRequestQuery, UserTeamsRequestBody>,
req: NextApiRequestQueryBody<UserTeamsRequestQuery, any>,
res: NextApiResponse,
) => {
await useCors(req, res);

View File

@ -9,8 +9,7 @@ import * as yup from 'yup';
const schema = {
GET: yup.object().shape({
userId: yup.string().uuid().required(),
includeTeams: yup.boolean(),
onlyTeams: yup.boolean(),
teamId: yup.string().uuid(),
...pageInfo,
}),
};