// @flow import * as React from "react"; import NoticeAlert from "components/NoticeAlert"; import useQuery from "hooks/useQuery"; export default function Notices() { const query = useQuery(); const notice = query.get("notice"); const description = query.get("description"); return ( <> {notice === "google-hd" && ( Sorry, Google sign in cannot be used with a personal email. Please try signing in with your Google Workspace account. )} {notice === "maximum-teams" && ( The team you authenticated with is not authorized on this installation. Try another? )} {notice === "hd-not-allowed" && ( Sorry, your Google apps domain is not allowed. Please try again with an allowed team domain. )} {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" && (description ? ( {description} ) : ( Authentication failed – we were unable to sign you in at this time. Please try again. ))} {notice === "expired-token" && ( Sorry, it looks like that sign-in link is no longer valid, please try requesting another. )} {notice === "suspended" && ( Your Outline 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. )} ); }