diff --git a/frontend/src/components/SessionDetail/CompatSessionDetail.tsx b/frontend/src/components/SessionDetail/CompatSessionDetail.tsx index 57301414..097c130d 100644 --- a/frontend/src/components/SessionDetail/CompatSessionDetail.tsx +++ b/frontend/src/components/SessionDetail/CompatSessionDetail.tsx @@ -72,7 +72,8 @@ const CompatSessionDetail: React.FC = ({ session }) => { const sessionDetails = [...finishedAt]; - const clientDetails: { label: string; value: string | JSX.Element }[] = []; + const clientDetails: { label: string; value: string | React.ReactElement }[] = + []; if (data.ssoLogin?.redirectUri) { clientDetails.push({ diff --git a/frontend/src/components/UnverifiedEmailAlert/UnverifiedEmailAlert.tsx b/frontend/src/components/UnverifiedEmailAlert/UnverifiedEmailAlert.tsx index 8b8e1891..319b0f5d 100644 --- a/frontend/src/components/UnverifiedEmailAlert/UnverifiedEmailAlert.tsx +++ b/frontend/src/components/UnverifiedEmailAlert/UnverifiedEmailAlert.tsx @@ -22,23 +22,23 @@ export const UNVERIFIED_EMAILS_FRAGMENT = graphql(/* GraphQL */ ` `); const UnverifiedEmailAlert: React.FC<{ - user?: FragmentType; + user: FragmentType; }> = ({ user }) => { const data = useFragment(UNVERIFIED_EMAILS_FRAGMENT, user); const [dismiss, setDismiss] = useState(false); const { t } = useTranslation(); - const currentCount = useRef(); + const currentCount = useRef(data.unverifiedEmails.totalCount); const doDismiss = (): void => setDismiss(true); useEffect(() => { - if (currentCount.current !== data?.unverifiedEmails?.totalCount) { - currentCount.current = data?.unverifiedEmails?.totalCount; + if (currentCount.current !== data.unverifiedEmails.totalCount) { + currentCount.current = data.unverifiedEmails.totalCount; setDismiss(false); } }, [data]); - if (!data?.unverifiedEmails?.totalCount || dismiss) { + if (!data.unverifiedEmails.totalCount || dismiss) { return null; }