import { WarningIcon } from "outline-icons";
import * as React from "react";
import { Trans } from "react-i18next";
import Notice from "~/components/Notice";
import useQuery from "~/hooks/useQuery";
export default function Notices() {
const query = useQuery();
const notice = query.get("notice");
const description = query.get("description");
if (!notice) {
return null;
}
return (
}>
{notice === "domain-required" && (
Unable to sign-in. Please navigate to your team's custom URL, then try
to sign-in again.
If you were invited to a team, you will find a link to it in the
invite email.
)}
{notice === "gmail-account-creation" && (
Sorry, a new account cannot be created with a personal Gmail address.
Please use a Google Workspaces account instead.
)}
{notice === "maximum-teams" && (
The team you authenticated with is not authorized on this
installation. Try another?
)}
{notice === "malformed-user-info" && (
We could not read the user info supplied by your identity provider.
)}
{notice === "email-auth-required" && (
Your account uses email sign-in, please sign-in with email to
continue.
)}
{notice === "email-auth-ratelimit" && (
An email sign-in link was recently sent, please check your inbox or
try again in a few minutes.
)}
{(notice === "auth-error" || notice === "state-mismatch") &&
(description ? (
<>{description}>
) : (
Authentication failed – we were unable to sign you in at this time.
Please try again.
))}
{notice === "invalid-authentication" &&
(description ? (
<>{description}>
) : (
Authentication failed – you do not have permission to access this
team.
))}
{notice === "expired-token" && (
Sorry, it looks like that sign-in link is no longer valid, please try
requesting another.
)}
{notice === "suspended" && (
Your account has been suspended. To re-activate your account, please
contact a team admin.
)}
{notice === "authentication-provider-disabled" && (
Authentication failed – this login method was disabled by a team
admin.
)}
{notice === "invite-required" && (
The team you are trying to join requires an invite before you can
create an account.
Please request an invite from your team admin and try again.
)}
{notice === "domain-not-allowed" && (
Sorry, your domain is not allowed. Please try again with an allowed
team domain.
)}
);
}